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 :
 -317 +796 +360 -229 
 -481 +296 +276 -323 
 +140 -259 +922 -701 
 +372 +124 -519 -729 
 B :
 +596 
 +38 
 +44 
 -53 
 inv(A) :
+9.981e-04 -2.381e-03 +4.803e-04 +2.795e-04 
+1.510e-03 -9.396e-04 -2.211e-04 +1.547e-04 
+5.547e-04 -6.148e-04 +7.184e-04 -5.927e-04 
+3.712e-04 -9.370e-04 -3.040e-04 -7.809e-04 
 X = inv(A) * B :
 +0.5107 
 +0.8461 
 +0.3703 
 +0.2136 
-------------------------------------- Ax = B ?
 B :
 +596 
 +38 
 +44 
 -53 
 AX :
 +596 
 +38 
 +44 
 -53 
 Press return to continue
 Press X to stop

Mathc matrices/c083b
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c01b.c */
void fun(int r)
double **A = i_mR(r,r);
double **Inv = i_mR(r,r);
double **B = r_mR(i_mR(r,C6),999.);
double **X = i_mR(r,C6);
double **T = i_mR(r,C6);
 do
 r_mR(A,999.);
 printf(".");
 }while(!det_R(A));
 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);
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
do
 fun(rp_I(RC5)+RC1);
} while(stop_w());
 return 0;
/* ------------------------------------ */
 Nous résolvons un système d'équations, et nous vérifions les calculs.

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 :
 +766 -263 -339 +266 
 +646 +266 +632 -533 
 +552 -339 +56 -645 
 +320 -447 -193 +380 
 b1 b2 ... bn :
 +886 -287 +706 +804 +94 -263 
 -673 -829 -61 +112 +710 +32 
 +640 +202 -981 -907 -401 +660 
 -279 +364 +310 -595 +188 +580 
 inv(A) :
+1.0589e-03 +5.0817e-04 -1.1897e-04 -2.3039e-04 
+1.4836e-03 +1.6291e-04 -8.9711e-04 -2.3327e-03 
-1.7265e-03 +1.3907e-03 -5.3580e-04 +2.2497e-03 
-2.3430e-05 +4.7002e-04 -1.2272e-03 +1.2242e-03 
 X = inv(A) * B :
 x1 x2 ... xn
 +0.5843 -0.8331 +0.7619 +1.1533 +0.4647 -0.4744 
 +1.2815 -1.5912 +1.1944 +3.4127 +0.1763 -2.3301 
 -3.4362 +0.0533 -0.0807 -2.0850 +1.4629 +1.4498 
 -1.4641 -0.1852 +1.5382 +0.4185 +1.0538 -0.0787 
-------------------------------------- Ax = B ?
 b1 b2 ... bn :
 +886 -287 +706 +804 +94 -263 
 -673 -829 -61 +112 +710 +32 
 +640 +202 -981 -907 -401 +660 
 -279 +364 +310 -595 +188 +580 
 Ax1 Ax2 ... Axn :
 +886 -287 +706 +804 +94 -263 
 -673 -829 -61 +112 +710 +32 
 +640 +202 -981 -907 -401 +660 
 -279 +364 +310 -595 +188 +580 
 Press return to continue
 Press X to stop

Mathc complexes/a08
Bibliothèque
Copier la bibliothèque dans votre répertoire de travail avec les fichiers des parties précédentes :
Exemple pour tester la bibliothèque :

Mathc complexes/h08a
Sommaire
Mathc complexes/h08b
Bibliothèque
Installer ce fichier dans votre répertoire de travail.
/* Save as : we_det2.h */
double **minor_mZ(
double **A,
double **Minor,
int minor_r, /* remove this row */
int minor_c /* remove this column */
int r;
int c;
int T_r;
int T_c;
 for(r=R1,T_r=R1; r<A[R_SIZE][C0]; r++)
 if(minor_r!=r)
 for( c=C1,T_c=C1; c<A[C_SIZE][C0]; c+=C2)
 if(minor_c!=c)
 Minor[T_r][T_c] = A[r][c];
 Minor[T_r][T_c+C1] = A[r][c+C1];
 T_c+=C2;
 T_r++;

return(Minor);
/* ------------------------------------ */
nb_Z minor_Z(
double **A,
int r,
int c
double **T = i_RC_mZ((A[R_SIZE][C0]-C1),
 (A[C_SIZE][C0]-C2));
nb_Z minor;
 minor_mZ(A,T,r,c);
 minor = det_Z(T);
 f_mZ(T);
return(minor);
/* ------------------------------------ */
nb_Z cofactor_Z(
double **A,
int r,
int c
int c_T = ((c-C1)/C2)+C1;
 return( smul_Z( pow(-1,(r+c_T)),
 minor_Z(A,r,c)) );
/* ------------------------------------ */
double **cofactor_mZ(
double **A,
double **Cofactor
int r;
int c;
nb_Z Cofac;
 for(r=R1; r<A[R_SIZE][C0]; r++)
 for( c=C1; c<A[C_SIZE][C0]; c+=C2)
 Cofac = cofactor_Z(A,r,c);
 Cofactor[r][c] = Cofac.r;
 Cofactor[r][c+C1] = Cofac.i;

return(Cofactor);
/* ------------------------------------ */
double **adjoint_mZ(
double **A,
double **Adjointe
double **T = i_RC_mZ(A[R_SIZE][C0],A[C_SIZE][C0]);
 transpose_mZ(cofactor_mZ(A,T),Adjointe);
 f_mZ(T);
return(Adjointe);
/* ------------------------------------ */
/* ------------------------------------ */
 Déclaration des fichiers h.

Mathc complexes/h08c
Bibliothèque
Installer ce fichier dans votre répertoire de travail.
/* Save as : we_det3.h */
double **inv_mZ(
double **A,
double **Adjointe
nb_Z z = det_Z(A);
int r;
 if(!(z.r && z.i))
 printf("\n inv_mZ error - A determinant is Zero");
 printf("\n Press return to continue.\n");
 fflush(stdout);
 getchar();
 exit(EXIT_FAILURE);
 adjoint_mZ(A,Adjointe);
 z = inv_Z(z);
 for(r=R1; r<A[R_SIZE][C0]; r++)
 mulR_mZ(Adjointe,z,r);
return(Adjointe);
/* ------------------------------------ */
 Déclaration des fichiers h.

Mathc complexes/h08d
Installer et compiler ce fichier dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00b.c */
void fun(int r,int c)
double **A = i_mZ(r,c);
 clrscrn();
 printf(" See the file \n\n");
 fPE_mZ(A,"a.txt"," A :", S5,P1, S7,P1,C4);
 f_mZ(A);
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
 do 
 fun(rp_I(R4),rp_I(C5));
 while(stop_w());
 return 0;
/* ------------------------------------ */
La fonction fPE_mZ(); est identique à la fonction PE_mZ(); mais elle écrit les nombres dans un fichier texte

Mathc complexes/c081a
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : inv_z.c */
void fun(int r)
double **A = r_mZ(i_mZ(r,r),9.);
double **Inv = i_mZ(r,r);
 clrscrn();
 printf(" Copy/Past into the octave window.\n\n");
 p_Octave_mZ(A,"A",P0 ,P0);
 printf(" inv(A)\n\n");
 printf(" inv_mZ(A,Inv); :");
 pE_mZ(inv_mZ(A,Inv), S1,P4, S1,P4, C2);
 f_mZ(Inv);
 f_mZ(A);
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
do
 fun(rp_I(RC3)+RC1);
} while(stop_w());
 return 0;
/* ------------------------------------ */
 Vérifier avec octave.