Mathc matrices/a185
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c01a.c */
int main(void)
double a[RA*CA] ={ 4,2,3,
 5,3,1,
 8,2,2};
double b[RA*Cb] ={ 3, 4, 9,
 2, 5, 8,
 1, 6, 7}; 
double **A = ca_A_mR(a,i_mR(RA,CA));
double **B = ca_A_mR(b,i_mR(RA,Cb));
double **Inv = i_mR(RA,CA);
double **X = i_mR(RA,Cb);
double **T = i_mR(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");
 getchar();
 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");
 getchar();
 clrscrn();
 printf(" A :\n");
 p_mR(A,S5,P0,C6);
 printf(" b1 b2 ... bn :\n");
 p_mR(B,S9,P0,C6);
 getchar();
 clrscrn();
 printf(" inv(A) :\n");
 pE_mR(inv_mR(A,Inv),S1,P4,C6);
 printf(" X = inv(A) * B :\n\n");
 printf(" x1 x2 ... xn\n");
 p_mR(mul_mR(Inv,B,X),S9,P4,C6);
 getchar();
 clrscrn();
 printf(" b1 b2 ... bn :\n");
 p_mR(B,S9,P0,C6);
 printf(" Ax1 Ax2 ... Axn :\n");
 p_mR(mul_mR(A,X,T),S9,P0,C6);
 f_mR(T);
 f_mR(X);
 f_mR(B);
 f_mR(Inv);
 f_mR(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 
 --------------------------------------
 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. 
 --------------------------------------
 A :
 +4 +2 +3 
 +5 +3 +1 
 +8 +2 +2 
 b1 b2 ... bn :
 +3 +4 +9 
 +2 +5 +8 
 +1 +6 +7 
 inv(A) :
-1.3333e-01 -6.6667e-02 +2.3333e-01 
+6.6667e-02 +5.3333e-01 -3.6667e-01 
+4.6667e-01 -2.6667e-01 -6.6667e-02 
 X = inv(A) * B :
 x1 x2 ... xn
 -0.3000 +0.5333 -0.1000 
 +0.9000 +0.7333 +2.3000 
 +0.8000 +0.1333 +1.6000 
 --------------------------------------
 b1 b2 ... bn :
 +3 +4 +9 
 +2 +5 +8 
 +1 +6 +7 
 Ax1 Ax2 ... Axn :
 +3 +4 +9 
 +2 +5 +8 
 +1 +6 +7 
 Press return to continue.

Mathc complexes/a197
Application 
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c01a.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 b[RA*(Cb*C2)] ={ 1,2, 
 3,4, 
 5,6 };
double **A = ca_A_mZ(a,i_mZ(RA,CA));
double **B = ca_A_mZ(b,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");
 getchar();
 clrscrn();
 printf(" A :\n");
 p_mZ(A, S5,P0, S4,P0, C6);
 printf(" B :\n");
 p_mZ(B, S5,P0, S4,P0, C6);
 getchar();
 clrscrn();
 printf(" inv(A) :\n");
 pE_mZ(inv_mZ(A,Inv), S12,P4, S12,P4, C4);
 printf(" X = inv(A) * B :\n");
 p_mZ(mul_mZ(Inv,B,X), S10,P4, S8,P4, C4);
 getchar();
 clrscrn();
 printf(" B :\n");
 p_mZ(B, S5,P0, S4,P0, C6);
 printf(" AX :\n");
 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. 
 A :
 +1 +2i +3 +4i +5 +6i 
 +5 +4i +1 +3i +6 +8i 
 +7 +2i +5 +1i +1 +1i 
 B :
 +1 +2i 
 +3 +4i 
 +5 +6i 
 inv(A) :
 -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 = inv(A) * B :
 +0.6598 +0.4745i 
 +0.2704 +0.2854i 
 -0.0376 -0.3013i 
 B :
 +1 +2i 
 +3 +4i 
 +5 +6i 
 AX :
 +1 +2i 
 +3 +4i 
 +5 +6i 
 Press return to continue.

Mathc complexes/a196
Application 
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c01a.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 b[RA*(C3*C2)] ={ 1,2, 2,3, 3,5, 
 3,4, 2,4, 3,4, 
 5,6, 2,5, 3,3 };
double **A = ca_A_mZ(a,i_mZ(RA,CA));
double **B = ca_A_mZ(b,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");
 getchar();
 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");
 getchar();
 clrscrn();
 printf(" A :\n");
 p_mZ(A, S4,P0, S3,P0, C6);
 printf(" b1 b2 ... bn");
 p_mZ(B, S4,P0, S3,P0, C6);
 getchar();
 clrscrn();
 printf(" inv(A) :");
 inv_mZ(A,Inv);
 pE_mZ(Inv, S12,P4, S12,P4, C4);
 printf(" X = inv(A) * B :\n");
 printf(" x1 x2 ... xn");
 mul_mZ(Inv,B,X);
 p_mZ(X, S10,P4, S8,P4, C4);
 getchar();
 clrscrn();
 printf(" b1 b2 ... bn");
 p_mZ(B, S6,P0, S3,P0, C6);
 printf(" Ax1 Ax2 ... Axn");
 mul_mZ(A,X,T);
 p_mZ(T, S6,P0, S3,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. 
 ----------------------------------
 A :
 +1 +2i +3 +4i +5 +6i 
 +5 +4i +1 +3i +6 +8i 
 +7 +2i +5 +1i +1 +1i 
 b1 b2 ... bn
 +1 +2i +2 +3i +3 +5i 
 +3 +4i +2 +4i +3 +4i 
 +5 +6i +2 +5i +3 +3i 
 ----------------------------------
 inv(A) :
 -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 = inv(A) * B :
 x1 x2 ... xn
 +0.6598 +0.4745i +0.1082 +0.4088i -0.0129 -0.0058i 
 +0.2704 +0.2854i +0.3728 +0.3222i +0.5929 +0.4583i 
 -0.0376 -0.3013i +0.2279 -0.2901i +0.3769 -0.1953i 
 b1 b2 ... bn
 +1 +2i +2 +3i +3 +5i 
 +3 +4i +2 +4i +3 +4i 
 +5 +6i +2 +5i +3 +3i 
 Ax1 Ax2 ... Axn
 +1 +2i +2 +3i +3 +5i 
 +3 +4i +2 +4i +3 +4i 
 +5 +6i +2 +5i +3 +3i 
 Press return to continue.