Aller au contenu

Mathc complexes/09c

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          RC2  
/* ------------------------------------ */       
/* ------------------------------------ */
int main(void)
{                          
double a[RCA*RCA] ={   
+1.142857142857, +0.571428571428, 
-0.285714285714, -0.142857142857       
};

double NLV[RCA*RCA] ={   
+0.970142500145, -0.447213595500, 
-0.242535625036, +0.894427191000 
};
                       
double **A      =  ca_A_mRZ(a,   i_mZ(RCA,RCA));
double **Nlv    =  ca_A_mRZ(NLV, i_mZ(RCA,RCA));
double **invNlv =  invgj_mZ(Nlv, i_mZ(RCA,RCA));
double **EValue =                i_mZ(RCA,RCA);

double **T      =                i_mZ(RCA,RCA);

  clrscrn();
  printf(" A :");
  p_mRZ(A, S9,P12, C4); 
  
  printf(" Nlv :");
  p_mRZ(Nlv, S9,P12, C4); 
 
  printf(" Verify if:\n\n"
         " EValue = invNlv * A * Nlv");
  mul_mZ(invNlv,A,T);
  mul_mZ(T,Nlv,EValue);
  p_mRZ(EValue, S9,P12, C4); 
          
  printf(" Verify if:\n\n"
         " A = Nlv EValue invNlv");
  mul_mZ(Nlv,EValue,T);
  mul_mZ(T,invNlv,A); 
  p_mRZ(A, S8,P12, C3);
  stop();
  
  clrscrn();          
  printf(" The matrix A projects the plane in the direction\n"
         " of the  eigenvector V  on a line  determined by\n"
         " the eigenvector V1 if :\n\n"
         " The eigenvector V1 has its eigenvalue equal to  one and\n"
         " The eigenvector V2 has its eigenvalue equal to zero and\n\n"
         " If The vectors V1 and V2 are linearly independent\n\n");
         
  printf(" det(Nlv)  = ");p_Z(det_Z(Nlv), S4,P5, S5,P5);printf("\n");
  stop();  
  
  f_mZ(A);
  f_mZ(Nlv);  
  f_mZ(invNlv);  
  f_mZ(T);  
  f_mZ(EValue);

  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 :
+1.142857142857 +0.571428571428 
-0.285714285714 -0.142857142857 

 Nlv :
+0.970142500145 -0.447213595500 
-0.242535625036 +0.894427191000 

 Verify if:

 EValue = invNlv * A * Nlv
+1.000000000000 -0.000000000001 
-0.000000000000 -0.000000000000 

 Verify if:

 A = Nlv EValue invNlv
+1.142857142857 +0.571428571428 
-0.285714285714 -0.142857142857 

 Press return to continue. 


 The matrix A projects the plane in the direction
 of the  eigenvector V  on a line  determined by
 the eigenvector V1 if :

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

 If The vectors V1 and V2 are linearly independent

 det(Nlv)  = +0.75926+0.00000i 
 Press return to continue.