Mathc complexes/a174
Application
Installer et compiler ce fichier dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00a.c */
void fun(void)
double **A[TAB];
double **P[TAB];
double **InvP[TAB];
double **T = i_mZ(RCA,RCA);
double **EigsValue = i_mZ(RCA,C1);
int c;
 for(c=C0; c<TAB; c++)
 A[c] = i_mZ(RCA,RCA); 
 P[c] = r_mZ(i_mZ(RCA,RCA),999); 
 InvP[c] = inv_mZ(P[c],i_mZ(RCA,RCA)); 
 rcsymmetric_mZ(A[0],99);
 for(c=C0; c<(TAB-C1); c++)
 mul_mZ(InvP[c],A[c],T); 
 mul_mZ(T,P[c],A[c+C1]);
 clrscrn();
 for(c=C0; c<TAB; c++)
 printf(" A[%d] : ",c); 
 p_mZ(A[c],S10,P2,S10,P2,C6);
 printf(" EigsValue of A[%d] : ",c); 
 eigsuv_mZ(A[c],EigsValue); 
 p_mZ(EigsValue,S10,P2,S10,P2,C6); 
 stop();
 for(c=C0; c<TAB; c++)
 f_mZ(A[c]);
 f_mZ(P[c]); 
 f_mZ(InvP[c]);

f_mZ(T); 
 f_mZ(EigsValue); 
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
 do{
 fun();
 }while(stop_w());
 return 0;
/* ------------------------------------ */
Je crée une suite de quatre Matrices semblables. 
Exemple de sortie écran :
 A[0] : 
 +17139.00 +0.00i +1867.00 +13527.00i -16643.00 +11508.00i 
 +1867.00 -13527.00i +28677.00 +0.00i +5587.00 +20009.00i 
 -16643.00 -11508.00i +5587.00 -20009.00i +33600.00 +0.00i 
 EigsValue of A[0] : 
 +64408.43 +0.00i 
 +11916.46 +0.00i 
 +3091.11 -0.00i 
 Press return to continue. 
 A[1] : 
 +24508.76 +2906.78i -10534.98 +3329.95i +17343.17 +16342.17i 
 -30867.39 +32326.89i +8591.66 -16314.14i -55451.62 +8423.38i 
 +27279.76 -13435.65i -1868.04 +5513.88i +46315.58 +13407.36i 
 EigsValue of A[1] : 
 +64408.43 +0.00i 
 +11916.46 -0.00i 
 +3091.11 +0.00i 
 Press return to continue. 
 A[2] : 
 +60795.43 -13669.72i -15764.62 +93761.16i +72696.92 -34594.11i 
 -27092.85 +9334.11i +9292.38 -57741.36i -34511.09 +27713.20i 
 -4013.45 +51543.34i -68375.30 -40505.73i +9328.18 +71411.08i 
 EigsValue of A[2] : 
 +64408.43 -0.00i 
 +11916.46 +0.00i 
 +3091.11 -0.00i 
 Press return to continue. 
 A[3] : 
 -9821.90+107437.42i -42096.60 -72140.20i -19330.10 +86328.73i 
-137094.92 -48534.24i +111238.92 -33699.38i -108420.45 -49133.11i 
 -45164.87 -86853.96i +67874.74 +29482.86i -22001.02 -73738.04i 
 EigsValue of A[3] : 
 +64408.43 +0.00i 
 +11916.46 +0.00i 
 +3091.11 -0.00i 
 Press return to continue. 
 Press return to continue
 Press X return to stop

Mathc matrices/a92
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c00a.c */
void fun(void)
double **A[TAB];
double **InvA[TAB];
double **P = r_mR( i_mR(RCA,RCA),99); 
double **InvP = inv_mR(P,i_mR(RCA,RCA) );
double **T = i_mR(RCA,RCA);
double **P_1_InvA0_P = i_mR(RCA,RCA);
int c;
 for(c=C0; c<TAB; c++)
 A[c] = i_mR(RCA,RCA); 
 InvA[c] = i_mR(RCA,RCA);

rsymmetric_mR(A[R0],99);
 mul_mR(InvP,A[C0],T); 
 mul_mR(T,P,A[C0+C1]);
 clrscrn();
 printf(" The two similar matrices :\n\n"
 " A[%d] = P**(-1) A[%d] P \n\n",C1,C0);
 for(c=C0; c<TAB; c++)
 printf(" A[%d] : ",c); 
 p_mR(A[c],S12,P4,C6); 
 stop(); 
 clrscrn(); 
 printf(" The inverse of the two similar matrices : \n\n"); 
 for(c=C0; c<TAB; c++)
 printf(" inVA[%d] : ", c); 
 pE_mR(inv_mR(A[c],InvA[c]),S12,P4,C6); 
 stop(); 
 clrscrn(); 
 mul_mR(InvP,InvA[C0],T); 
 mul_mR(T,P,P_1_InvA0_P); 
 printf(" InVA[%d] = P**(-1) InVA[%d] P \n\n",C1,C0); 
 printf(" InVA[%d] : ",C1); 
 pE_mR(InvA[1],S12,P4,C6); 
 printf(" P**(-1) InVA[%d] P : ",C0); 
 pE_mR(P_1_InvA0_P,S12,P4,C6); 
 for(c=C0; c<TAB; c++)
 f_mR(A[c]);
 f_mR(InvA[c]);

f_mR(P); 
 f_mR(InvP); 
 f_mR(T); 
 f_mR(P_1_InvA0_P); 
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
 do{
 fun();
 }while(stop_w());
 return 0;
/* ------------------------------------ */
Je crée une suite de deux Matrices semblables.

Exemple de sortie écran :
 The two similar matrices :
 A[1] = P**(-1) A[0] P 
 A[0] : 
 +35.0000 +6.0000 -76.0000 -19.0000 -83.0000 
 +6.0000 -29.0000 +7.0000 +85.0000 +66.0000 
 -76.0000 +7.0000 -45.0000 -92.0000 +55.0000 
 -19.0000 +85.0000 -92.0000 +63.0000 +23.0000 
 -83.0000 +66.0000 +55.0000 +23.0000 -43.0000 
 A[1] : 
 -301.4072 +178.1993 +446.6857 -4.6939 +54.1201 
 -515.0931 +927.9275 +806.4553 +18.2792 +501.5759 
 -82.8418 -56.1180 +136.8056 +8.1428 -45.4983 
 -1352.1784 +1164.7454 +2242.0871 +14.3362 +503.5888 
 +857.1939 -1426.4624 -1348.0146 -49.9780 -796.6621 
 Press return to continue. 
 --------------------------------
 The inverse of the two similar matrices : 
 inVA[0] : 
 -9.0639e-03 -1.2330e-02 -8.6761e-03 +4.8573e-03 -9.9291e-03 
 -1.2330e-02 -1.5976e-02 -6.0784e-03 +1.0091e-02 -3.0985e-03 
 -8.6761e-03 -6.0784e-03 -4.7194e-03 -1.5155e-03 +5.7026e-04 
 +4.8573e-03 +1.0091e-02 -1.5155e-03 -1.1660e-05 +4.1681e-03 
 -9.9291e-03 -3.0985e-03 +5.7026e-04 +4.1681e-03 -5.8873e-03 
 inVA[1] : 
 -2.8665e-02 +1.2678e-02 +5.0058e-03 +6.9387e-03 +1.0135e-02 
 -9.1496e-03 +4.8196e-02 +4.5941e-02 -3.2636e-03 +2.5036e-02 
 -1.5292e-02 -9.8480e-04 -4.2025e-03 +5.2426e-03 +1.8951e-03 
 -2.5164e-02 +5.9997e-02 +1.2673e-01 -1.1240e-02 +2.1722e-02 
 +1.2994e-02 -7.4753e-02 -7.7712e-02 +5.1438e-03 -3.9747e-02 
 Press return to continue. 
 --------------------------------
 InVA[1] = P**(-1) InVA[0] P 
 InVA[1] : 
 -2.8665e-02 +1.2678e-02 +5.0058e-03 +6.9387e-03 +1.0135e-02 
 -9.1496e-03 +4.8196e-02 +4.5941e-02 -3.2636e-03 +2.5036e-02 
 -1.5292e-02 -9.8480e-04 -4.2025e-03 +5.2426e-03 +1.8951e-03 
 -2.5164e-02 +5.9997e-02 +1.2673e-01 -1.1240e-02 +2.1722e-02 
 +1.2994e-02 -7.4753e-02 -7.7712e-02 +5.1438e-03 -3.9747e-02 
 P**(-1) InVA[0] P : 
 -2.8665e-02 +1.2678e-02 +5.0058e-03 +6.9387e-03 +1.0135e-02 
 -9.1496e-03 +4.8196e-02 +4.5941e-02 -3.2636e-03 +2.5036e-02 
 -1.5292e-02 -9.8480e-04 -4.2025e-03 +5.2426e-03 +1.8951e-03 
 -2.5164e-02 +5.9997e-02 +1.2673e-01 -1.1240e-02 +2.1722e-02 
 +1.2994e-02 -7.4753e-02 -7.7712e-02 +5.1438e-03 -3.9747e-02 
 Press return to continue
 Press X return to stop

Mathc complexes/a175
Application
Installer et compiler ce fichier dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00a.c */
void fun(void)
double **A[TAB];
double **InvA[TAB];
double **P = r_mZ( i_mZ(RCA,RCA),99); 
double **InvP = inv_mZ(P,i_mZ(RCA,RCA) );
double **T = i_mZ(RCA,RCA);
double **P_1_InvA0_P = i_mZ(RCA,RCA);
int c;
 for(c=C0; c<TAB; c++)
 A[c] = i_mZ(RCA,RCA); 
 InvA[c] = i_mZ(RCA,RCA);

r_mZ(A[C0],99); 
 mul_mZ(InvP,A[C0],T); 
 mul_mZ(T,P,A[C0+C1]);
 clrscrn();
 printf(" The two similar matrices :\n\n"
 " A[%d] = P**(-1) A[%d] P \n\n",C1,C0);
 for(c=C0; c<TAB; c++)
 printf(" A[%d] : ",c); 
 p_mZ(A[c],S12,P4,S12,P4,C6); 
 stop(); 
 clrscrn(); 
 printf(" The inverse of the two similar matrices : \n\n"); 
 for(c=C0; c<TAB; c++)
 printf(" InvA[%d] : ",c
 pE_mZ(inv_mZ(A[c],InvA[c]),S12,P4,S11,P4,C6); 
 stop(); 
 clrscrn(); 
 mul_mZ(InvP,InvA[C0],T); 
 mul_mZ(T,P,P_1_InvA0_P);
 printf(" InvA[%d] = P**(-1) InvA[%d] P \n\n",C1,C0); 
 printf(" InvA[%d] : ",C1); 
 pE_mZ(InvA[1],S12,P4,S11,P4,C6); 
 printf(" P**(-1) InvA[%d] P : ",C0); 
 pE_mZ(P_1_InvA0_P,S12,P4,S11,P4,C6); 
 for(c=C0; c<TAB; c++)
 f_mZ(A[c]);
 f_mZ(InvA[c]);