Mathc matrices/e12d3
Application: Déterminant .. ou .. Application: Valeurs aléatoires
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c00a.c */
void fun(int r)
double **Q = r_Q_mR( i_mR(r,r), 9);
double **Q_T = transpose_mR(Q,i_mR(r,r));
double **Ide = i_mR(r,r);
 clrscrn();
 printf(" Q : An orthonormal matrix");
 p_mR(Q, S7,P3, C6);
 printf(" Ide = Q * Q_T : "); 
 mul_mR(Q,Q_T, Ide);
 p_mR(Ide, S8,P4, C6);
 printf(" det_R(Q) = %+.4f\n",det_R(Q));
 f_mR(Q);
 f_mR(Q_T);
 f_mR(Ide);
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
do
 fun(rp_I(R3)+R2);
} while(stop_w());
 return 0;
/* ------------------------------------ */
 Matrices orthonormales :
Exemple de sortie écran :
 Q : An orthonormal matrix
 +0.815 +0.332 +0.251 -0.403 
 -0.181 -0.510 +0.787 -0.296 
 -0.091 -0.327 -0.526 -0.780 
 +0.543 -0.723 -0.202 +0.376 
 Ide = Q * Q_T : 
 +1.0000 +0.0000 -0.0000 +0.0000 
 +0.0000 +1.0000 +0.0000 -0.0000 
 -0.0000 +0.0000 +1.0000 +0.0000 
 +0.0000 -0.0000 +0.0000 +1.0000 
 det_R(Q) = +1.0000
 Press return to continue
 Press X to stop

Mathc matrices/e12d4
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c00b.c */
void fun(int r)
double **q = r_q_mR(i_mR(r,r), 9);
 clrscrn();
 printf(" q : An orthogonal matrix\n\n");
 p_mR(q,S3,P3,C6);

f_mR(q);
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
do
 fun(rp_I(R3)+R2);
} while(stop_w());
 return 0;
/* ------------------------------------ */
 Matrices orthogonales :
Exemple de sortie écran :
 q : An orthogonal matrix
-1.000 +2.769 +1.025 -4.638 
-5.000 +1.846 -4.528 -0.357 
+6.000 -5.615 -1.968 -1.903 
+9.000 +5.077 -1.090 +0.555 
 Press return to continue
 Press X to stop

Mathc matrices/e12d5
Propriétés
Mathc matrices/e12d6
Fonctions de bases
Valeur propre, vecteur propre :
Valeurs singulières :

Mathc matrices/e12d7
Application
La fonction inv_mR(); :
Résoudre : AX = B :
Résoudre : A|x1|x2| ... |xn| = b1|b2| ... |bn| :

Mathc matrices/e12d8
Étude du code
Mathc matrices/e12d9
Fonctions de bases
Calculer le mineur :
La matrice pour calculer un mineur :
calculer un cofacteur:
La matrice des cofacteurs :
Calculer l'adjointe (La transposé de la matrice des cofacteurs) :

Mathc matrices/e12f
Bibliothèque
----

Mathc matrices/c12fn
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : cgn0g.c */
void fun(int r,int c)
double **B = r_mR(i_mR(c,r),9.);
double **Pinv = i_mR(r,c); 
double **PinvB = i_mR(r,r); 
 clrscrn();
 printf(" Copy/Past into the octave windows \n\n\n");
 p_Octave_mR(B,"B",P2);
 printf("pinv(B)\n\n\n");
 stop();
 clrscrn();
 printf(" Pinv = V * invS_T * U_T ");
 pseudo_Rn_uv_mR(B,Pinv,FACTOR_E); 
 pE_mR(Pinv,S12,P4,C10); 
 printf(" Ide = PseudoInverse * B "); 
 mul_mR(Pinv,B,PinvB); 
 p_mR(PinvB,S10,P6,C10); 
 f_mR(B); 
 f_mR(Pinv);
 f_mR(PinvB); 
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
int i;
do
 i = rp_I(R3)+R1;
 fun(i,i+R0);
} while(stop_w());
 return 0;
/* ------------------------------------ */

Exemple de sortie écran :
 Copy/Past into the octave windows 
 B=[
+7.00,+6.00,-8.00;
-5.00,-1.00,-2.00;
+1.00,+5.00,+8.00]
pinv(B)
 Press return to continue. 
 ------------------------------------
 Pinv = V * invS_T * U_T 
 +4.6083e-03 -2.0276e-01 -4.6083e-02 
 +8.7558e-02 +1.4747e-01 +1.2442e-01 
 -5.5300e-02 -6.6820e-02 +5.2995e-02 
 Ide = PseudoInverse * B 
 +1.000000 -0.000000 -0.000000 
 +0.000000 +1.000000 +0.000000 
 +0.000000 +0.000000 +1.000000 
 Press return to continue
 Press X to stop

Mathc matrices/c12fn2
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : cgn2g.c */
void fun(int r,int c)
double **B = r_mR(i_mR(c,r),9.);
double **Pinv = i_mR(r,c); 
double **PinvB = i_mR(r,r); 
 clrscrn();
 printf(" Copy/Past into the octave windows \n\n\n");
 p_Octave_mR(B,"B",P2);
 printf("pinv(B)\n\n\n");
 stop();
 clrscrn(); 
 printf(" Pinv = V * invS_T * U_T ");
 pseudo_Rn_uv_mR(B,Pinv,FACTOR_E); 
 pE_mR(Pinv,S12,P4,C10); 
 printf(" Ide = PseudoInverse * B "); 
 mul_mR(Pinv,B,PinvB); 
 p_mR(PinvB,S10,P6,C10); 
 f_mR(B); 
 f_mR(Pinv);
 f_mR(PinvB); 
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
int i;
do
 i = rp_I(R3)+R1;
 fun(i,i+R2);
} while(stop_w());
 return 0;
/* ------------------------------------ */

Exemple de sortie écran :
 Copy/Past into the octave windows 
 B=[
-7.00,+8.00,+8.00,+5.00;
-8.00,+4.00,-4.00,+8.00;
+9.00,+4.00,+4.00,+5.00;
-9.00,+4.00,+5.00,-7.00;
-4.00,+8.00,-3.00,-1.00;
-1.00,-8.00,-7.00,+7.00]
pinv(B)
 Press return to continue. 
 ------------------------------------ 
 Pinv = V * invS_T * U_T 
 -2.4342e-02 -2.1733e-02 +4.2319e-02 -3.3242e-02 +1.0995e-02 -1.9675e-02 
 -6.1720e-03 +1.9905e-02 +2.9593e-02 -1.0775e-02 +7.1818e-02 -3.9993e-02 
 +5.8232e-02 -2.7683e-02 +1.4116e-02 +2.4681e-02 -6.9007e-02 -5.2172e-03 
 +3.8650e-02 +3.1283e-02 +2.5795e-02 -2.5786e-02 -2.2175e-02 +3.2120e-02 
 Ide = PseudoInverse * B 
 +1.000000 +0.000000 +0.000000 +0.000000 
 -0.000000 +1.000000 +0.000000 +0.000000 
 +0.000000 +0.000000 +1.000000 +0.000000 
 -0.000000 -0.000000 -0.000000 +1.000000 
 Press return to continue
 Press X to stop

Mathc matrices/c12fn3
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : cgn6g.c */
void fun(int r,int c)
double **B = r_mR(i_mR(c,r),9.);
double **Pinv = i_mR(r,c); 
double **PinvB = i_mR(r,r); 
 clrscrn();
 printf(" Copy/Past into the octave windows \n\n\n");
 p_Octave_mR(B,"B",P2);
 printf("pinv(B)\n\n\n");
 stop();
 clrscrn(); 
 printf(" Pinv = V * invS_T * U_T ");
 pseudo_Rn_uv_mR(B,Pinv,FACTOR_E); 
 pE_mR(Pinv,S12,P4,C5); 
 printf(" Ide = PseudoInverse * B "); 
 mul_mR(Pinv,B,PinvB); 
 p_mR(PinvB,S10,P6,C10); 
 f_mR(B); 
 f_mR(Pinv);
 f_mR(PinvB); 
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
int i;
do
 i = rp_I(R3)+R1;
 fun(i,i+R6);
} while(stop_w());
 return 0;
/* ------------------------------------ */

Exemple de sortie écran :
 Copy/Past into the octave windows 
 B=[
-2.00,-9.00,+1.00;
+6.00,+7.00,-4.00;
-6.00,-5.00,-8.00;
+1.00,-1.00,-6.00;
-8.00,-5.00,-6.00;
+5.00,+9.00,+8.00;
+6.00,-6.00,-6.00;
-2.00,-9.00,+9.00;
+4.00,+4.00,+7.00]
pinv(B)
 Press return to continue. 
 ------------------------------------ 
 Pinv = V * invS_T * U_T 
 +1.1138e-02 +2.4665e-02 -2.1793e-02 +1.4151e-02 -3.7185e-02 
 -2.9436e-02 +1.1324e-02 +7.9218e-04 -4.5451e-03 +5.7982e-03 
 +7.5670e-03 -1.8246e-02 -1.6644e-02 -1.7432e-02 -9.5160e-03 
 +3.3418e-03 +6.3385e-02 +5.3998e-03 +1.1421e-02 
 +1.7546e-02 -3.8223e-02 -3.2356e-02 +1.4417e-03 
 +1.5901e-02 -1.9193e-02 +3.0340e-02 +1.5597e-02 
 Ide = PseudoInverse * B 
 +1.000000 -0.000000 +0.000000 
 +0.000000 +1.000000 +0.000000 
 -0.000000 -0.000000 +1.000000 
 Press return to continue
 Press X to stop

Mathc matrices/c12fn4
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : ccn1g.c */
void fun(int r,int c)
double **A = r_mR(i_mR(r,c),9.);
double **Pinv = i_mR(c,r); 
double **Ide = i_mR(r,r); 
 clrscrn();
 printf(" Copy/Past into the octave windows \n\n\n");
 p_Octave_mR(A,"A",P2);
 printf("pinv(A)\n\n\n");
 stop();
 clrscrn();
 printf(" PseudoInverse = V * invS_T * U_T ");
 pseudo_Cn_uv_mR(A,Pinv,FACTOR_E); 
 pE_mR(Pinv,S12,P4,C10);
 printf(" Ide = A * PseudoInverse ");
 mul_mR(A,Pinv,Ide); 
 p_mR(Ide,S10,P6,C10); 
 f_mR(A); 
 f_mR(Pinv); 
 f_mR(Ide); 
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
int i;
do
 i = rp_I(R3)+R1;
 fun(i,i+C1);
} while(stop_w());
 return 0;
/* ------------------------------------ */