Mathc complexes/a66
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00c.c */
/* ------------------------------------ */
void fun(int r,int c)
double **A = r_mZ(i_mZ(r,c),99);
double **A_T = ctranspose_mZ(A,i_mZ(c,r));
double **V = i_mZ(r,c);
double **V_T = i_mZ(c,r);
double **U = i_mZ(r,c);
double **U_T = i_mZ(c,r); // :c,r 
double **U_TA = i_mZ(c,c); // c,r r,c :c,c
double **U_TA2 = i_mZ(c,r); // c,r :c,r 
double **U_TA2V = i_mZ(c,c); // c,r r,c :c,c X_Value
double **invU_TA2V = i_mZ(c,c); // c,r r,c :c,c invX_Value
double **VinvU_TA2V = i_mZ(r,c);
double **VinvU_TA2VU_T = i_mZ(r,r);
double **VinvU_TA2VU_TA2 = i_mZ(r,c); // r,c | r,r
 clrscrn();
 printf(" A :");
 p_mZ(A, S10,P2, S8,P2, C3);
 X_U_mZ(A_T,U,FACTOR_E);
 printf(" U :");
 p_mZ(U, S10,P4, S8,P4, C3);
 X_V_mZ(A_T,V,FACTOR_E);
 printf(" V :");
 p_mZ(V, S10,P4, S8,P4, C3); 
 ctranspose_mZ(U,U_T);
 ctranspose_mZ(V,V_T); 
/* X_Value = U_T * A * V */
 mul_mZ( U_T, A, U_TA); // U_TA : c,c
 c_mZ( U_TA, U_TA2); // U_TA2 : c,r 
 mul_mZ( U_TA2, V, U_TA2V); // V : r,c
 printf(" X_Value = U_T * A * V :");
 p_mZ(U_TA2V, S10,P4, S8,P4, C3);
 stop(); 
 clrscrn(); 
 X_inv_mZ(U_TA2V, invU_TA2V);
 printf(" invX_Value invU_TA2V:");
 pE_mZ(invU_TA2V, S10,P4, S8,P4, C3);
/* invA = V * invX_Value * U_T */ 
 mul_mZ(V,invU_TA2V,VinvU_TA2V);
 mul_mZ(VinvU_TA2V,U_T,VinvU_TA2VU_T); 
 printf(" PseudoinverseA = V * invX_Value * U_T:");
 pE_mZ(VinvU_TA2VU_T, S10,P4, S8,P4, C3); 
 mul_mZ(VinvU_TA2VU_T,A,VinvU_TA2VU_TA2); 
 printf(" Ide = PseudoinverseA * A ");
 p_mZ(VinvU_TA2VU_TA2, S10,P4, S8,P4, C3); 
 f_mZ(A);
 f_mZ(A_T);
 f_mZ(V);
 f_mZ(V_T);
 f_mZ(U);
 f_mZ(U_T);
 f_mZ(U_TA);
 f_mZ(U_TA2); 
 f_mZ(U_TA2V);
 f_mZ(invU_TA2V);
 f_mZ(VinvU_TA2V);
 f_mZ(VinvU_TA2VU_T);
 f_mZ(VinvU_TA2VU_TA2); 
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
do
 fun(R3,C2);
} while(stop_w());
 return 0;
/* ------------------------------------ */
 Exemple de sortie écran :
 A :
 +6.00 +70.00i +71.00 +33.00i -70.00 +94.00i 
 -12.00 +16.00i +61.00 +23.00i -92.00 +91.00i 
 +26.00 +19.00i +96.00 +52.00i +9.00 +62.00i 
 U :
 +0.6071 +0.2428i -0.1629 +0.0101i -0.5736 -0.4656i 
 +0.5145 +0.2836i -0.4140 -0.3170i +0.3803 +0.4883i 
 +0.4768 +0.0000i +0.8376 +0.0000i +0.2668 +0.0000i 
 V :
 +0.2282 +0.1833i +0.2535 -0.1450i -0.8938 -0.1738i 
 -0.0251 +0.5768i -0.1041 -0.7790i +0.2171 -0.0432i 
 +0.7622 +0.0000i +0.5450 +0.0000i +0.3492 +0.0000i 
 X_Value = U_T * A * V :
 -48.4205+231.6014i +0.0000 -0.0000i -0.0000 -0.0000i 
 -0.0000 +0.0000i +53.4515-54.1563i +0.0000 +0.0000i 
 -0.0000 -0.0000i -0.0000 -0.0000i +23.5987+27.3566i 
 Press return to continue. 
 -----------------------------------------
 invX_Value invU_TA2V:
-8.6490e-04-4.1369e-03i +0.0000e+00+0.0000e+00i +0.0000e+00+0.0000e+00i 
+0.0000e+00+0.0000e+00i +9.2317e-03+9.3535e-03i +0.0000e+00+0.0000e+00i 
+0.0000e+00+0.0000e+00i +0.0000e+00+0.0000e+00i +1.8079e-02-2.0958e-02i 
 PseudoinverseA = V * invX_Value * U_T:
+3.5819e-03-1.9173e-02i -1.7993e-03+1.5615e-02i -1.9193e-03+4.4976e-03i 
+1.0021e-03+4.9064e-03i -3.5833e-04+9.9706e-04i +7.2521e-03-8.4491e-03i 
-2.1484e-03+4.5024e-03i -6.1053e-03-7.8170e-03i +5.5840e-03+8.1376e-04i 
 Ide = PseudoinverseA * A 
 +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 
 Press return to continue
 Press X to stop

Mathc complexes/a67
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00a.c */
void fun()
int r = R6;
int c = C3;
double **A = r_mZ( i_mZ(r,c),99.);
double **A2 = c_mZ(A, eye_mZ(i_mZ(r,r)));
double **EigsValue = i_mZ(r,C1);
 clrscrn();
 printf(" A :");
 p_mZ(A, S4,P0, S4,P0, C3); 
 stop();
 clrscrn();
 printf(" Copy/Past into the octave windows \n\n\n");
 p_Octave_mZ(A2,"a",P0,P0); 
 printf(" EigenValues = eigs (a,10) \n\n\n");
 eigsuv_mZ(A2, EigsValue);
 printf(" The %d EigsValues :",c );
 p_mZ(EigsValue, S10,P4, S10,P4, C3); 
 f_mZ(A);
 f_mZ(EigsValue);
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
do
 fun();
} while(stop_w());
 return 0;
/* ------------------------------------ */
Je veux calculer les valeurs propres de la matrice M qui a plus de lignes que de colonnes.
Le problème vient de ce que l'algorithme que j'utilise fonctionne uniquement sur les matrices carrées.
J'ai trouvé cet algorithme qui me permet de calculer les valeurs propres d'une matrice qui a plus de lignes que de colonnes.
Je ne soit pas sûr qu'il soit utile, mais je l'enregistre pour mémoire.
Je transforme simplement ma matrice A qui n'est pas carrée en une matrice A2 qui est carrée.

Exemple de sortie écran :
 A :
 -33 +55i -6 +18i -75 +92i 
 -25 -94i -65 -43i -31 -35i 
 -91 -4i -26 -14i +45 +90i 
 -30 +64i -73 +75i +22 +8i 
 +70 -86i -43 +73i -27 -83i 
 -41 -9i +62 +32i -5 -91i 
 Press return to continue. 
 Copy/Past into the octave windows 
 a=[
-33+55*i,-6+18*i,-75+92*i,+0+0*i,+0+0*i,+0+0*i;
-25-94*i,-65-43*i,-31-35*i,+0+0*i,+0+0*i,+0+0*i;
-91-4*i,-26-14*i,+45+90*i,+0+0*i,+0+0*i,+0+0*i;
-30+64*i,-73+75*i,+22+8*i,+1+0*i,+0+0*i,+0+0*i;
+70-86*i,-43+73*i,-27-83*i,+0+0*i,+1+0*i,+0+0*i;
-41-9*i,+62+32*i,-5-91*i,+0+0*i,+0+0*i,+1+0*i]
 EigenValues = eigs (a,10) 
 The 3 EigsValues :
 -74.9181 +86.2770i 
 +100.8290 +34.0516i 
 -78.9109 -18.3285i 
 +1.0000 +0.0000i 
 +1.0000 -0.0000i 
 +1.0000 +0.0000i 
 Press return to continue
 Press X to stop

Mathc complexes/a68
Application
Installer et compiler ce fichier dans votre répertoire de travail.
/* Save as : c00d.c */
void fun(int rc)
double **A = rdiag_mZ(i_mZ(rc,rc),99);
double **AC1 = i_mZ(rc,C1);
 clrscrn();
 printf(" A[R%d,C%d] : ",rsize_Z(A),csize_Z(A));
 p_mZ(A, S5,P0, S4,P0, C8);
 printf(" AC1[R%d,C%d] :",rsize_Z(AC1),csize_Z(AC1));
 p_mZ( c_D_C1_mZ(A,AC1), S4,P0, S4,P0, C8);
 f_mZ(A);
 f_mZ(AC1);
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
 do
 fun(rp_I(RC5));
 while(stop_w()); 
 return 0;
/* ------------------------------------ */
 Copier une matrice diagonale dans une matrice d'une colonne :
Exemple de sortie écran :
 ----------------------------------
 A[R4,C4] : 
 +87 +69i +0 +0i +0 +0i +0 +0i 
 +0 +0i +8 +46i +0 +0i +0 +0i 
 +0 +0i +0 +0i -43 -84i +0 +0i 
 +0 +0i +0 +0i +0 +0i -29 -46i 
 AC1[R4,C1] : 
 +87 +69i 
 +8 +46i 
 -43 -84i 
 -29 -46i 
 Press return to continue
 Press X to stop

Formation musicale/Caractéristiques et notation des sons musicaux