Aller au contenu

Mathc complexes/a46

Un livre de Wikilivres.



Valeurs propres


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


c00b.c
/* ------------------------------------ */
/*  Save as :   c00b.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
/* ------------------------------------ */
#define FACTOR_E       +1.E-2 
#define RCA             R4 
/* ------------------------------------ */       
/* ------------------------------------ */
void fun(void)
{
double a[RCA*(RCA*C2)] ={   
  +25072,     +0,   +21293,  -4811,    +5386,  -6531,   +11975,  -5847, 
  +21293,  +4811,   +30848,     +0,    -1526,  -1774,   +13478,  -6658, 
   +5386,  +6531,    -1526,  +1774,   +20007,     +0,    +7542,  -1322, 
  +11975,  +5847,   +13478,  +6658,    +7542,  +1322,   +21250,     +0  };
                       
double **A =        ca_A_mZ(a, i_mZ(RCA,RCA));
double **V =                   i_mZ(RCA,RCA);
double **cV_T =                i_mZ(RCA,RCA);
double **T   =                 i_mZ(RCA,RCA);

double **EValue     =          i_mZ(RCA,C1);
double **EigsValue  =          i_mZ(RCA,RCA);

  clrscrn();
  printf(" Copy/Past into the octave windows \n\n\n");
  p_Octave_mZ(A,"a",P0,P0);  
  printf(" [V, E]  = eigs (a,%d) \n\n\n",RCA);
  stop();
  
  clrscrn();
/* V and cV_T*/  
  eigs_V_mZ(A,V,FACTOR_E);
  printf(" V :");
  pE_mZ(V, S12,P4, S12,P4, C3);
  printf(" cV_T :");
  pE_mZ(ctranspose_mZ(V,cV_T), S12,P4, S12,P4, C3);
  stop();

  clrscrn();   
  eigs_mZ(A,EValue);
  printf(" EigsValue :"); 
  p_mZ(EValue, S12,P4, S8,P4, C3); 
 
/* EigsValue = cV_T * A * V */   
  mul_mZ(cV_T,A,T);
  mul_mZ(T,V,EigsValue); 
  printf(" EigsValue = cV_T * A * V");
  p_mZ(EigsValue, S12,P4, S8,P4, C3);
  stop(); 
        
  f_mZ(A);
  f_mZ(V);
  f_mZ(cV_T);
  f_mZ(EigsValue);
  f_mZ(EValue);
  f_mZ(T);    
}
/* ------------------------------------ */
int main(void)
{
    fun();

  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */


Avec les matrices réelles nous avons calculer les vecteurs et valeurs propres des matrices symétriques. Avec les matrices complexes nous allons calculer les vecteurs et valeurs propres des matrices symétriques conjuguées.


Contrôle du facteur :

  • FACTOR_E ..... +1.E-1 ......... -9 < x < 9
  • FACTOR_E ..... +1.E-2 ....... -99 < x < 99
  • FACTOR_E ..... +1.E-3 ..... -999 < x < 999


Nous allons étudier une des propriétés des valeurs propres et des vecteurs propres :

              EigsValue = cV_T * A * V


Exemple de sortie écran :
 ------------------------------------
 Copy/Past into the octave windows 


 a=[
+25072+0*i,+21293-4811*i,+5386-6531*i,+11975-5847*i;
+21293+4811*i,+30848+0*i,-1526-1774*i,+13478-6658*i;
+5386+6531*i,-1526+1774*i,+20007+0*i,+7542-1322*i;
+11975+5847*i,+13478+6658*i,+7542+1322*i,+21250+0*i]

 [V, E]  = eigs (a,4) 


 Press return to continue. 


 ------------------------------------
 V :
 +4.8972e-01 -3.2491e-01i  +1.2352e-02 -3.1358e-02i  -2.3564e-01 +4.7870e-01i 
 +5.8126e-01 -2.5956e-01i  -2.5508e-01 +3.5827e-01i  -1.6780e-01 -2.1539e-01i 
 +1.8661e-01 +5.4231e-02i  +6.9872e-01 -4.9734e-01i  -2.2037e-01 -5.7021e-03i 
 +4.6001e-01 +1.5960e-17i  +2.6435e-01 -2.3604e-17i  +7.6953e-01 +0.0000e+00i 

 -1.3282e-01 -5.9258e-01i 
 -1.9928e-01 +5.3580e-01i 
 -2.8408e-01 +3.1206e-01i 
 +3.5543e-01 +3.7510e-18i 

 cV_T :
 +4.8972e-01 +3.2491e-01i  +5.8126e-01 +2.5956e-01i  +1.8661e-01 -5.4231e-02i 
 +1.2352e-02 +3.1358e-02i  -2.5508e-01 -3.5827e-01i  +6.9872e-01 +4.9734e-01i 
 -2.3564e-01 -4.7870e-01i  -1.6780e-01 +2.1539e-01i  -2.2037e-01 +5.7021e-03i 
 -1.3282e-01 +5.9258e-01i  -1.9928e-01 -5.3580e-01i  -2.8408e-01 -3.1206e-01i 

 +4.6001e-01 -1.5960e-17i 
 +2.6435e-01 +2.3604e-17i 
 +7.6953e-01 -0.0000e+00i 
 +3.5543e-01 -3.7510e-18i 

 Press return to continue. 


 ------------------------------------
 EigsValue :
 +61819.1491 +0.0000i 
 +22896.2153 +0.0000i 
 +10720.5399 +0.0000i 
  +1741.0958 +0.0000i 

 EigsValue = cV_T * A * V
 +61819.1491 -0.0000i      -0.0000 +0.0000i      -0.0000 -0.0000i 
     -0.0000 -0.0000i  +22896.2153 -0.0000i      -0.0000 -0.0000i 
     -0.0000 +0.0000i      -0.0000 +0.0000i  +10720.5399 +0.0000i 
     +0.0000 +0.0000i      -0.0000 -0.0000i      +0.0000 +0.0000i 

     -0.0000 -0.0000i 
     -0.0000 +0.0000i 
     +0.0000 -0.0000i 
  +1741.0958 +0.0000i 

 Press return to continue
 Press X      to stop