Mathc matrices/a43
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00.c */
/* ------------------------------------ */
/* ------------------------------------ */
//#define B (2./3.)
/* ------------------------------------ */
int main(void)
/* 
 * Find a value for "B" so that the system is compatible.
double ab[RA*(CA+Cb)]={
// A = x*B + y 
 -9, +4, +6, -4, -3*B, -2, 
 +4, +8, -2, -9, +4*B, 1, 
 -6, +9, +7, +1, -7*B, 2, 
 -9, +4, +6, -4, -6*B, 0 }; 
double **Ab = ca_A_mR(ab,i_Abr_Ac_bc_mR(RA,CA,Cb));
double **A = c_Ab_A_mR(Ab,i_mR(RA,CA));
double **b = c_Ab_b_mR(Ab,i_mR(RA,Cb));
 clrscrn();
 printf(" A :");
 p_mR(A,S3,P0,C7);
 printf(" b :");
 p_mR(b,S3,P0,C7);
 printf(" Ab :");
 p_mR(Ab,S3,P0,C7);
 getchar();
 clrscrn();
 printf(" Copy/Past into the octave window.\n\n");
 p_Octave_mR(Ab,"Ab",P0);
 printf("\n rref(Ab.00000000001)\n\n");
 printf(" gj_PP_mR(Ab,YES) :");
 gj_PP_mR(Ab,YES);
 p_mR(Ab,S8,P4,C7);
 stop();
 f_mR(Ab);
 f_mR(b);
 f_mR(A);
 return 0;
/* ------------------------------------ */
 Calculer la valeur de B pour que le système soit compatible.

Exemple de sortie écran :
 A :
 -9 +4 +6 -4 
 +4 +8 -2 -9 
 -6 +9 +7 +1 
 -9 +4 +6 -4 
 b :
 -3 -2 
 +4 +1 
 -7 +2 
 -6 +0 
 Ab :
 -9 +4 +6 -4 -3 -2 
 +4 +8 -2 -9 +4 +1 
 -6 +9 +7 +1 -7 +2 
 -9 +4 +6 -4 -6 +0 
 ------------------------------------ 
 Copy/Past into the octave window.
 Ab=[
-9,+4,+6,-4,-3,-2;
+4,+8,-2,-9,+4,+1;
-6,+9,+7,+1,-7,+2;
-9,+4,+6,-4,-6,+0]
 rref(Ab.00000000001)
 gj_PP_mR(Ab,YES) :
 +1.0000 +0.0000 +0.0000 +2.5929 -1.2124 +1.0354 
 +0.0000 +1.0000 +0.0000 -1.3850 +0.4513 -0.0752 
 +0.0000 +0.0000 +1.0000 +4.1460 -2.6195 +1.2699 
 +0.0000 +0.0000 +0.0000 +0.0000 -3.0000 +2.0000 
 Press return to continue. 
La dernière ligne donne :
 +0.0000 +0.0000 +0.0000 +0.0000 -3.0000 +2.0000 
 ou bien
 +0.0000 = -3.0000 +2.0000
 en introduisant B 
 +0.0000 = -3.0000 B +2.0000 
 soit le système 
 -3.0000 B = -2.0000 
 cela donne
 B = 2./3.

Mathc matrices/a44
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00.c */
/* ------------------------------------ */
/* ------------------------------------ */
//#define B (1./6.)
/* ------------------------------------ */
int main(void)
/* 
 * Find a value for "B" so that the system is compatible.
double ab[RA*(CA+Cb)]={
// A = x*B + y 
 -2, +8, -3, -6, +8, +9*B, 1, 
 -8, +5, -1, -1, -4, +1*B, 2, 
 +4, -8, +9, -6, -3, +7*B, 3, 
 +4, -8, +9, -6, -3, +1*B, 4, 
 -4, +2, +6, -6, +9, -1*B, 5 
double **Ab = ca_A_mR(ab,i_Abr_Ac_bc_mR(RA,CA,Cb));
double **A = c_Ab_A_mR(Ab,i_mR(RA,CA));
double **b = c_Ab_b_mR(Ab,i_mR(RA,Cb));
 clrscrn();
 printf(" A :");
 p_mR(A,S3,P0,C7);
 printf(" b :");
 p_mR(b,S3,P0,C7);
 printf(" Ab :");
 p_mR(Ab,S3,P0,C7);
 getchar();
 clrscrn();
 printf(" Copy/Past into the octave window.\n\n");
 p_Octave_mR(Ab,"Ab",P0);
 printf("\n rref(Ab.00000000001)\n\n");
 printf(" gj_PP_mR(Ab,YES) :");
 gj_PP_mR(Ab,YES);
 p_mR(Ab,S8,P4,C7);
 stop();
 f_mR(Ab);
 f_mR(b);
 f_mR(A);
 return 0;
/* ------------------------------------ */
 Calculer la valeur de B pour que le système soit compatible.

Exemple de sortie écran :
 A :
 -2 +8 -3 -6 +8 
 -8 +5 -1 -1 -4 
 +4 -8 +9 -6 -3 
 +4 -8 +9 -6 -3 
 -4 +2 +6 -6 +9 
 b :
 +9 +1 
 +1 +2 
 +7 +3 
 +1 +4 
 -1 +5 
 Ab :
 -2 +8 -3 -6 +8 +9 +1 
 -8 +5 -1 -1 -4 +1 +2 
 +4 -8 +9 -6 -3 +7 +3 
 +4 -8 +9 -6 -3 +1 +4 
 -4 +2 +6 -6 +9 -1 +5 
 Copy/Past into the octave window.
 Ab=[
-2,+8,-3,-6,+8,+9,+1;
-8,+5,-1,-1,-4,+1,+2;
+4,-8,+9,-6,-3,+7,+3;
+4,-8,+9,-6,-3,+1,+4;
-4,+2,+6,-6,+9,-1,+5]
 rref(Ab.00000000001)
 gj_PP_mR(Ab,YES) :
 +1.0000 +0.0000 +0.0000 +0.0000 +2.5000 -0.2800 -0.2600 
 +0.0000 +1.0000 +0.0000 +0.0000 +4.2500 -0.9700 +0.0100 
 +0.0000 +0.0000 +1.0000 +0.0000 +3.5000 -1.8200 +0.3933 
 -0.0000 -0.0000 -0.0000 +1.0000 +1.7500 -1.7900 -0.2633 
 +0.0000 +0.0000 +0.0000 +0.0000 +0.0000 +6.0000 -1.0000 
 Press return to continue. 
La dernière ligne donne :
 +0.0000 +0.0000 +0.0000 +0.0000 +0.0000 +6.0000 -1.0000 
 ou bien
 +0.0000 = +6.0000 -1.0000 
 en introduisant B 
 +0.0000 = +6.0000 B -1.0000 
 soit le système 
 +6.0000 B = +1.0000 
 cela donne
 B = 1./6.

Mathc matrices/a45
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00.c */
void fun(int r)
double **Ab = r_singular_Ab_mR(i_Abr_Ac_bc_mR(r,r,C1),9);
double **A = c_Ab_A_mR(Ab,i_mR(r,r));
double **b = c_Ab_b_mR(Ab,i_mR(r,C1));
 clrscrn();
 printf(" A :");
 p_mR(A,S4,P0,C7);
 printf(" b :");
 r_mR(b,9.); /* I change the value of b */
 p_mR(b,S4,P0,C7); 
 printf(" Ab :");
 P_mR(c_A_b_Ab_mR(A,b,Ab),S4,P0,C7);
 stop();
 clrscrn();
 printf(" Copy/Past into the octave window.\n\n");
 p_Octave_mR(Ab,"Ab",P0);
 printf("\n rref(Ab.00000000001)\n\n");
 stop();
 clrscrn();
 printf(" gj_mR(Ab) :");
 gj_PP_mR(Ab,YES);
 p_mR(Ab,S10,P4,C7);
 // is_system_consistent_mR(Ab);
 f_mR(Ab);
 f_mR(b);
 f_mR(A);
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
do
 fun(R4);
} while(stop_w());
 return 0;
/* ------------------------------------ */
 Créer une matrice pour le travail ci-dessus.
 Exemple de sortie écran :
 A :
 +5 -6 -6 -5 
 -3 -1 +3 -5 
 +5 -6 -6 -5 
 -3 -1 +3 -5 
 b :
 -8 
 -4 
 +2 
 -1 
 Ab :
 +5, -6, -6, -5, -8, 
 -3, -1, +3, -5, -4, 
 +5, -6, -6, -5, +2, 
 -3, -1, +3, -5, -1 
 Press return to continue. 
 ------------------------------------ 
 Copy/Past into the octave window.
 Ab=[
+5,-6,-6,-5,-8;
-3,-1,+3,-5,-4;
+5,-6,-6,-5,+2;
-3,-1,+3,-5,-1]
 rref(Ab.00000000001)
 Press return to continue. 
 gj_mR(Ab) :
 +1.0000 +0.0000 -1.0435 +1.0870 +0.6957 
 -0.0000 +1.0000 +0.1304 +1.7391 +1.9130 
 +0.0000 +0.0000 +0.0000 -0.0000 +10.0000 
 +0.0000 +0.0000 +0.0000 +0.0000 +3.0000 
 Press return to continue
 Press X return to stop .

Mathc matrices/a46
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00.c */
/* ------------------------------------ */
/* ------------------------------------ */
//#define B (-4./5.)
//#define C (-3./5.)
/* ------------------------------------ */
int main(void)
/* 
 * Find a value for "B" so that the system is compatible.
double ab[RA*(CA+Cb)]={
// A = x*B + y*C + z
 +9, -2, +1, +3*B, +1*C, +2, 
 -27, +6, -3, +0*B, +0*C, +3, 
 +18, -4, +2, +1*B, +2*C, +0, 
double **Ab = ca_A_mR(ab,i_Abr_Ac_bc_mR(RA,CA,Cb));
double **A = c_Ab_A_mR(Ab,i_mR(RA,CA));
double **b = c_Ab_b_mR(Ab,i_mR(RA,Cb));
 clrscrn();
 printf(" A :");
 p_mR(A,S3,P0,C7);
 printf(" b :");
 p_mR(b,S3,P0,C7);
 printf(" Ab :");
 p_mR(Ab,S3,P0,C7);
 getchar();
 clrscrn();
 printf(" Copy/Past into the octave window.\n\n");
 p_Octave_mR(Ab,"Ab",P0);
 printf("\n rref(Ab.00000000001)\n\n");
 printf(" gj_PP_mR(Ab,YES) :");
 gj_PP_mR(Ab,YES);
 p_mR(Ab,S8,P4,C7);
 stop();
 f_mR(Ab);
 f_mR(b);
 f_mR(A);
 return 0;
/* ------------------------------------ */
 Calculer la valeur de B et de C pour que le système soit compatible.