Aller au contenu

Mathc complexes/08x

Un livre de Wikilivres.


Application

Installer et compiler ces fichiers dans votre répertoire de travail.

c00c.c
/* ------------------------------------ */
/*  Save as :   c00c.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */     
#define RCA          RC4  
/* ------------------------------------ */       
/* ------------------------------------ */
int main(void)
{                          
double a[RCA*RCA] ={   
+0.81250000, -0.65625000, -1.40625000, -0.65625000, 
-0.25000000, +0.12500000, -1.87500000, -0.87500000, 
+0.12500000, +0.43750000, +1.93750000, +0.43750000, 
-0.25000000, -0.87500000, -1.87500000, +0.12500000  
};

double NVN[RCA*RCA] ={   
+0.730296743340, -0.258198889747, -0.272165526976, -0.447213595500, 
+0.547722557505, -0.258198889747, -0.680413817440, -0.596284794000, 
-0.182574185835, +0.516397779494, +0.544331053952, +0.298142397000, 
-0.365148371670, -0.774596669241, -0.408248290464, -0.596284794000  
};
                       
double **A      =  ca_A_mRZ(a,  i_mZ(RCA,RCA));
double **Nvn    =  ca_A_mRZ(NVN,i_mZ(RCA,RCA));
double **invNvn = invgj_mZ(Nvn, i_mZ(RCA,RCA));
double **EValue =               i_mZ(RCA,RCA);

double **T      =               i_mZ(RCA,RCA);
   
  clrscrn();
  printf(" A :");
  p_mRZ(A, S9,P8, C4); 
  
  printf(" Nvn :");
  p_mRZ(Nvn, S9,P8, C4); 
 
  printf(" Verify if:\n\n"
         " EValue = invNvn A Nvn\n\n"
         " EValue 1    EValue 2    EValue 3    EValue 4");
  mul_mZ(invNvn,A,T);
  mul_mZ(T,Nvn,EValue);         
  p_mRZ(EValue, S9,P8, C4); 
  stop();
  
  clrscrn(); 
  printf(" A :");
  p_mRZ(A, S9,P8, C4);
            
  printf(" Verify if:\n\n"
         " A = Nvn EValue invNvn");
  mul_mZ(Nvn,EValue,T);
  mul_mZ(T,invNvn,A); 
  p_mRZ(A, S8,P8, C4);
  stop();
  
  clrscrn();        
  printf(" det(Nvn)  = ");p_Z(det_Z(Nvn), S4,P5, S5,P5);printf("\n");    
  
  printf(" det(Nvn) != 0 V1 and V2 and V3 and V4 are"
         " linearly independent\n\n");  
                    
  printf(" The matrix A projects the hyperspace in the direction\n"
         " of the  eigenvector V4  on a hyperplan  determined by\n"
         " the eigenvectors V1, V2 and V3 if :\n\n"
         " The eigenvector V1 has its eigenvalue equal to  one and   \n"
         " The eigenvector V2 has its eigenvalue equal to  one and   \n"
         " The eigenvector V3 has its eigenvalue equal to  one and   \n"         
         " The eigenvector V4 has its eigenvalue equal to zero and \n\n"
         " If The vectors V1, V2, V3, V4 are linearly independent\n\n");         
  stop();  
  
  f_mZ(A);
  f_mZ(Nvn);  
  f_mZ(invNvn);
  f_mZ(EValue);    
  f_mZ(T);  


  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
 Vous vérifiez les propriétés de la matrice A.

* Les valeurs propres : EValue = invNlv A Nlv
* La matrice :               A = Nvn EValue invNvn

Si les vecteurs colonnes de A sont linéairement indépendants

Exemple de sortie écran :

 A :
+0.81250000 -0.65625000 -1.40625000 -0.65625000 
-0.25000000 +0.12500000 -1.87500000 -0.87500000 
+0.12500000 +0.43750000 +1.93750000 +0.43750000 
-0.25000000 -0.87500000 -1.87500000 +0.12500000 

 Nvn :
+0.73029674 -0.25819889 -0.27216553 -0.44721360 
+0.54772256 -0.25819889 -0.68041382 -0.59628479 
-0.18257419 +0.51639778 +0.54433105 +0.29814240 
-0.36514837 -0.77459667 -0.40824829 -0.59628479 

 Verify if:

 EValue = invNvn * A * Nvn

 EValue 1    EValue 2    EValue 3    EValue 4
+1.00000000 +0.00000000 +0.00000000 +0.00000000 
-0.00000000 +1.00000000 +0.00000000 +0.00000000 
+0.00000000 -0.00000000 +1.00000000 +0.00000000 
-0.00000000 +0.00000000 +0.00000000 +0.00000000 

 Press return to continue. 


 A :
+0.81250000 -0.65625000 -1.40625000 -0.65625000 
-0.25000000 +0.12500000 -1.87500000 -0.87500000 
+0.12500000 +0.43750000 +1.93750000 +0.43750000 
-0.25000000 -0.87500000 -1.87500000 +0.12500000 

 Verify if:

 A = Nvn EValue invNvn
+0.81250000 -0.65625000 -1.40625000 -0.65625000 
-0.25000000 +0.12500000 -1.87500000 -0.87500000 
+0.12500000 +0.43750000 +1.93750000 +0.43750000 
-0.25000000 -0.87500000 -1.87500000 +0.12500000 

 Press return to continue. 


 det(Nvn)  = -0.09180+0.00000i 
 det(Nvn) != 0 V1 and V2 and V3 and V4 are linearly independent

 The matrix A projects the hyperspace in the direction
 of the  eigenvector V4  on a hyperplan  determined by
 the eigenvectors V1, V2 and V3 if :

 The eigenvector V1 has its eigenvalue equal to  one and   
 The eigenvector V2 has its eigenvalue equal to  one and   
 The eigenvector V3 has its eigenvalue equal to  one and   
 The eigenvector V4 has its eigenvalue equal to zero and 

 If The vectors V1, V2, V3, V4 are linearly independent

 Press return to continue.