Mathc complexes/a190
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c00a.c */
int main(void)
double a[RA*(CA*C2)] = { 1,2, 3,4, 5,6,
 5,4, 1,3, 6,8,
 7,2, 5,1, 1,1};
double b0[RA*(Cb*C2)] ={ 1,4, 5,4, 3,1, 
 2,5, 3,5, 2,3, 
 3,6, 2,6, 2,4 }; 
double **A = ca_A_mZ(a, i_mZ(RA,CA)); 
double **b = ca_A_mZ(b0,i_mZ(RA,Cb)); 
double **X = i_mZ(RA,Cb);
double **T = i_mZ(RA,Cb);
double **Ab = i_Abr_Ac_bc_mZ(RA,CA,Cb);
 c_A_b_Ab_mZ(A,b,Ab);
 clrscrn();
 printf(" \n");
 printf(" Linear systems with common coefficient matrix.\n\n");
 printf(" Ax1=b1 \n");
 printf(" Ax2=b2 \n");
 printf(" ... \n");
 printf(" Axn=bn \n\n");
 printf(" We can write these equalities in this maner. \n\n");
 printf(" A|x1|x2|...|xn| = b1|b2|...|bn| \n\n");
 printf(" or simply : \n\n");
 printf(" AX = b \n\n");
 printf(" where b = b1|b2|...|bn \n\n");
 printf(" and X = x1|x2|...|xn \n\n");
 stop();
 clrscrn();
 printf(" We want to find X such as, \n\n");
 printf(" AX = b \n\n");
 printf(" We can use the function, \n");
 printf(" gaussjordan : gj_mZ(Ab); \n\n");
 printf(" To verify the result you can \n");
 printf(" multiply the matrix A by X. \n");
 printf(" You must refind b. \n\n\n");
 stop();
 clrscrn();
 printf(" A :\n");
 p_mZ(A, S5,P0, S4,P0, C6);
 printf(" b1 b2 ... bn :\n");
 p_mZ(b, S5,P0, S4,P0, C6);
 stop();
 clrscrn();
 printf(" gj1_mZ(Ab) :");
 gj_mZ(Ab);
 p_mZ(Ab, S8,P4, S8,P4, C3);
 stop();
 clrscrn();
 printf(" gj1_mZ(Ab) :");
 p_mZ(Ab, S10,P3, S4,P3, C4);
 printf(" X :");
 p_mZ(c_Ab_b_mZ(Ab,X), S10,P3, S4,P3, C4);
 stop();
 clrscrn();
 clrscrn();
 printf(" b1 b2 ... bn :");
 p_mZ(b, S5,P0, S3,P0, C6);
 printf(" Ax1 Ax2 ... Axn :");
 p_mZ(mul_mZ(A,X,T), S5,P0, S3,P0, C6);
 f_mZ(Ab);
 f_mZ(T);
 f_mZ(X);
 f_mZ(b);
 f_mZ(A);
 stop();
 return 0;
/* ------------------------------------ */

Exemple de sortie écran :
 Linear systems with common coefficient matrix.
 Ax1=b1 
 Ax2=b2 
 Axn=bn 
 We can write these equalities in this maner. 
 A|x1|x2|...|xn| = b1|b2|...|bn| 
 or simply : 
 AX = b 
 where b = b1|b2|...|bn 
 and X = x1|x2|...|xn 
 Press return to continue. 
 ------------------------------------ 
 We want to find X such as, 
 AX = b 
 We can use the function, 
 gaussjordan : gj_mZ(Ab); 
 To verify the result you can 
 multiply the matrix A by X. 
 You must refind b. 
 Press return to continue. 
 A :
 +1 +2i +3 +4i +5 +6i 
 +5 +4i +1 +3i +6 +8i 
 +7 +2i +5 +1i +1 +1i 
 b1 b2 ... bn :
 +1 +4i +5 +4i +3 +1i 
 +2 +5i +3 +5i +2 +3i 
 +3 +6i +2 +6i +2 +4i 
 Press return to continue. 
 ------------------------------------ 
 gj1_mZ(Ab) :
 +1.0000 +0.0000i +0.0000 -0.0000i +0.0000 +0.0000i 
 +0.0000 +0.0000i +1.0000 +0.0000i +0.0000 +0.0000i 
 +0.0000 +0.0000i +0.0000 +0.0000i +1.0000 +0.0000i 
 +0.3085 +0.3691i -0.2077 +0.6268i +0.0742 +0.5774i 
 +0.3263 +0.4945i +0.8123 +0.2695i +0.4261 -0.0711i 
 +0.2212 -0.2204i +0.3918 -0.5240i +0.0867 -0.3474i 
 Press return to continue. 
 gj1_mZ(Ab) :
 +1.000+0.000i +0.000-0.000i +0.000+0.000i +0.309+0.369i 
 +0.000+0.000i +1.000+0.000i +0.000+0.000i +0.326+0.495i 
 +0.000+0.000i +0.000+0.000i +1.000+0.000i +0.221-0.220i 
 -0.208+0.627i +0.074+0.577i 
 +0.812+0.270i +0.426-0.071i 
 +0.392-0.524i +0.087-0.347i 
 X :
 +0.309+0.369i -0.208+0.627i +0.074+0.577i 
 +0.326+0.495i +0.812+0.270i +0.426-0.071i 
 +0.221-0.220i +0.392-0.524i +0.087-0.347i 
 Press return to continue. 
 ------------------------------------ 
 b1 b2 ... bn :
 +1 +4i +5 +4i +3 +1i 
 +2 +5i +3 +5i +2 +3i 
 +3 +6i +2 +6i +2 +4i 
 Ax1 Ax2 ... Axn :
 +1 +4i +5 +4i +3 +1i 
 +2 +5i +3 +5i +2 +3i 
 +3 +6i +2 +6i +2 +4i 
 Press return to continue.

Mathc complexes/a191
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c00a.c */
int main(void)
double a[RA*(CA*C2)] = { 1,2, 3,4, 5,6,
 5,4, 1,3, 6,8,
 7,2, 5,1, 1,1};
double b0[RA*(Cb*C2)] ={ 1,4, 
 2,5, 
 3,6}; 
double **A = ca_A_mZ(a, i_mZ(RA,CA)); 
double **B = ca_A_mZ(b0,i_mZ(RA,Cb)); 
double **Inv = i_mZ(RA,CA);
double **X = i_mZ(RA,Cb);
double **T = i_mZ(RA,Cb);
 clrscrn();
 printf(" We want to find X such as, \n\n");
 printf(" AX = B \n\n");
 printf(" If A is a square matrix and, \n\n");
 printf(" If A has an inverse matrix, \n\n");
 printf(" you can find X by this method\n\n");
 printf(" X = inv(A) B \n\n\n");
 printf(" To verify the result you can \n\n");
 printf(" multiply the matrix A by X. \n\n");
 printf(" You must refind B. \n\n");
 stop();
 clrscrn();
 printf(" A :");
 p_mZ(A, S5,P0, S4,P0, C6);
 printf(" B :");
 p_mZ(B, S5,P0, S4,P0, C6);
 stop();
 clrscrn();
 printf(" invgj_mZ(A,Inv) :");
 pE_mZ(invgj_mZ(A,Inv), S12,P4, S8,P4, C3);
 printf(" X = invgj_mZ(A,Inv) * B :");
 p_mZ(mul_mZ(Inv,B,X), S12,P4, S2, P4, C6);
 stop();
 clrscrn();
 printf(" B :");
 p_mZ(B, S5,P0, S4,P0, C6);
 printf(" AX :");
 p_mZ(mul_mZ(A,X,T), S5,P0, S4,P0, C6);
 f_mZ(T);
 f_mZ(X);
 f_mZ(B);
 f_mZ(Inv);
 f_mZ(A);
 stop();
 return 0;
/* ------------------------------------ */
--------------------- */

Exemple de sortie écran :
 We want to find X such as, 
 AX = B 
 If A is a square matrix and, 
 If A has an inverse matrix, 
 you can find X by this method
 X = inv(A) B 
 To verify the result you can 
 multiply the matrix A by X. 
 You must refind B. 
 Press return to continue. 
 ------------------------------------ 
 A :
 +1 +2i +3 +4i +5 +6i 
 +5 +4i +1 +3i +6 +8i 
 +7 +2i +5 +1i +1 +1i 
 B :
 +1 +4i 
 +2 +5i 
 +3 +6i 
 Press return to continue. 
 invgj_mZ(A,Inv) :
 -1.2917e-01+8.1007e-02i +8.5597e-02-6.6602e-02i +8.5160e-02-3.3778e-04i 
 +1.8258e-01-8.6352e-02i -1.5122e-01+8.1911e-02i +9.3058e-02-3.8517e-02i 
 +3.7156e-03-6.3244e-02i +7.1142e-02-3.4463e-02i -8.4514e-02+1.6084e-02i 
 X = invgj_mZ(A,Inv) * B :
 +0.3085+0.3691i 
 +0.3263+0.4945i 
 +0.2212-0.2204i 
 Press return to continue. 
 ------------------------------------ 
 B :
 +1 +4i 
 +2 +5i 
 +3 +6i 
 AX :
 +1 +4i 
 +2 +5i 
 +3 +6i 
 Press return to continue.

Mathc complexes/a192
Application 
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c00a.c */
int main(void)
double a[RA*(CA*C2)] = { 1,2, 3,4, 5,6,
 5,4, 1,3, 6,8,
 7,2, 5,1, 1,1};
double b0[RA*(Cb*C2)] ={ 1,4, 5,4, 3,1, 
 2,5, 3,5, 2,3, 
 3,6, 2,6, 2,4 }; 
double **A = ca_A_mZ(a, i_mZ(RA,CA)); 
double **B = ca_A_mZ(b0,i_mZ(RA,Cb)); 
double **Inv = i_mZ(RA,CA);
double **X = i_mZ(RA,Cb);
double **T = i_mZ(RA,Cb);
 clrscrn();
 printf(" \n");
 printf(" Linear systems with common coefficient matrix.\n\n");
 printf(" Ax1=b1 \n");
 printf(" Ax2=b2 \n");
 printf(" ... \n");
 printf(" Axn=bn \n\n");
 printf(" We can write these equalities in this maner. \n\n");
 printf(" A|x1|x2|...|xn| = b1|b2|...|bn| \n\n");
 printf(" or simply : \n\n");
 printf(" AX = B \n\n");
 printf(" where B = b1|b2|...|bn \n\n");
 printf(" and X = x1|x2|...|xn \n\n");
 stop();
 clrscrn();
 printf(" We want to find X such as, \n\n");
 printf(" AX = B \n\n");
 printf(" If A is a square matrix and, \n\n");
 printf(" If A has an inverse matrix, \n\n");
 printf(" you can find X by this method\n\n");
 printf(" X = inv(A) B \n\n\n");
 printf(" To verify the result you can \n\n");
 printf(" multiply the matrix A by X. \n\n");
 printf(" You must refind B. \n\n");
 stop();
 clrscrn();
 printf(" A :");
 p_mZ(A, S5,P0, S3,P0, C6);
 printf(" b1 b2 ... bn :");
 p_mZ(B, S5,P0, S3,P0, C6);
 stop();
 clrscrn();
 printf(" invgj_mZ(A,Inv) :");
 pE_mZ(invgj_mZ(A,Inv), S12,P4, S6,P4, C3);
 printf(" X = invgj_mZ(A,Inv) * B :\n\n");
 printf(" x1 x2 ... xn :");
 p_mZ(mul_mZ(Inv,B,X), S9,P4, S6,P4, C6);
 stop();
 clrscrn();
 printf(" b1 b2 ... bn :");
 p_mZ(B, S5,P0, S3,P0, C6);
 printf(" Ax1 Ax2 ... Axn :");
 p_mZ(mul_mZ(A,X,T), S5,P0, S3,P0, C6);
 f_mZ(T);
 f_mZ(X);
 f_mZ(B);
 f_mZ(Inv);
 f_mZ(A);
 stop();
 return 0;
/* ------------------------------------ */