« Mathc matrices/c101d » : différence entre les versions

Contenu supprimé Contenu ajouté
petit modification
modification mineure
Ligne 2 :
 
 
[[Mathc matrices/a10a16| Sommaire]]
 
 
Ligne 9 :
 
 
 
{{Fichier|gj_r2gj_s2.c|largeur=70%|info=|icon=Crystal Clear mimetype source c.png}}
<syntaxhighlight lang="c">
/* ------------------------------------ */
/* Save as : gj_r2gj_s2.c */
/* ------------------------------------ */
#include "v_a.h"
Ligne 18 ⟶ 19 :
void fun(int r)
{
double **A Ab = r_mRr_singular_Ab_mR(i_mRi_Abr_Ac_bc_mR(r,r+C2,C1),999.);
double **bA = c_Ab_A_mR(Ab,i_mR(r,C1r));
double **Abb = i_Abr_Ac_bc_mRc_Ab_b_mR(rAb,i_mR(r+C2,C1));
 
/* i_Abr_Ac_bc_mR(R_Ab,C_A,C_b)); */
 
clrscrn();
Ligne 27 ⟶ 28 :
p_mR(A,S8,P0,C7);
printf(" b :");
p_mR(r_mR(b,999.),S8,P0,C7);
r_mR(b,999.); /* I change the value of b */
p_mR(r_mR(b,999.),S8,P0,C7);
printf(" Ab :");
p_mR(c_A_b_Ab_mR(A,b,Ab),S8,P0,C7);
getcharstop();
 
clrscrn();
Ligne 36 ⟶ 40 :
p_Octave_mR(Ab,"Ab",P0);
printf("\n rref(Ab,.00000000001)\n\n");
stop();
 
clrscrn();
printf(" gj_mR(Ab) :");
p_mR(gj_mRgj_PP_mR(Ab),S10,P5,C7YES);
p_mR(Ab,S10,P5,C7);
is_system_consistent_mR(Ab);
 
f_mR(Ab);
Ligne 65 ⟶ 75 :
 
 
Nous calculons la distance entre les deux matrices.
 
Déclaration des fichiers h.
Ligne 74 ⟶ 83 :
------------------------------------
A :
-543255 -823569 +346 -35 -917391 -705155
-491+380 +480426 +854622 +934-899 +342-779
+850-497 -493429 -509 +4 -655 +812 -411+20
+380 +426 +622 -899 -779
+380 +426 +622 -899 -779
 
b :
-189+424
+94880
+516208
+734
+606
 
Ab :
-543255 -823569 +346 -35 -917391 -705155 -189+424
-491+380 +480426 +854622 +934-899 +342-779 +94880
+850-497 -493429 -509 +4 -655 +812 -411+20 +516208
+380 +426 +622 -899 -779 +734
+380 +426 +622 -899 -779 +606
 
Press return to continue.
 
 
 
------------------------------------
Copy/Past into the octave window.
 
Ab=[
-543255,-823,+346569,-91735,-705391,-189155,+424;
-491,+480380,+854426,+934622,+342-899,-779,+94880;
+850-497,-493429,+4,+812-509,-411655,+20,+516]208;
+380,+426,+622,-899,-779,+734;
+380,+426,+622,-899,-779,+606]
 
 
rref(Ab,.00000000001)
 
Press X return to stop continue.
gj_mR(Ab) :
+1.00000 +0.00000 +0.00000 +1.41027 -0.00196 +0.77518
+0.00000 +1.00000 -0.00000 +0.79627 +0.82974 +0.30111
+0.00000 +0.00000 +1.00000 +1.45695 -0.06703 +1.38651
 
 
 
Press return to continue
gj_mR(Ab) :
Press X to stop
+1.00000 +0.00000 +0.00000 +18.4102774503 -0+3.0019688021 +0-1.7751838717
+0.00000 +1.00000 -0.00000 +0-2.7962793820 +0-1.8297429837 +-0.3011119161
+0.00000 +0.00000 +1.00000 +1-4.4569577563 -02.0670373372 +1.3865110732
+0.00000 +0.00000 +0.00000 -0.00000 +0.00000 +654.00000
+0.00000 +0.00000 +0.00000 -0.00000 +0.00000 +526.00000
 
This(ese) row(s) are incompatible.
row 4; row 5;
The system is inconsistent.
I prefer to close the program.
Press return to continue.
 
</syntaxhighlight>