Valeurs propres. Vecteurs propres

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


c00a.c
/* ------------------------------------ */
/*  Save as :  c00a.c                   */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
#define   RCA C3
/* ------------------------------------ */
int main(void)
{
double a[RCA*RCA]={
+3,+4,+8,
+4,+5,+2,
+8,+2,+7
};

double **A            = ca_A_mR(a,i_mR(RCA,RCA));
double **EigsVector   =           i_mR(RCA,RCA);
double **T_EigsVector =           i_mR(RCA,RCA);
double **EigsValue    =           i_mR(RCA,RCA);

double **T1 =  i_mR(RCA,RCA);

  clrscrn();
  printf(" Copy/Past into the octave windows \n\n");
  p_Octave_mR(A,"a",P0);
  printf(" [V, E] = eigs (a,%d) \n\n",RCA);
  stop();

  clrscrn();   
  eigs_V_mR(A,EigsVector); 
  printf(" EignVector:");
  p_mR(EigsVector,S10,P4,C6);

  printf(" EigsValue : T_EigsVector * A * EigsVector");   
  transpose_mR(EigsVector,T_EigsVector);   
  mul_mR(T_EigsVector,A,T1);
  mul_mR(T1,EigsVector,EigsValue);
  p_mR(EigsValue,S10,P4,C6);      

  printf(" T_EigsVector * EigsVector = IDE");     
        mul_mR(T_EigsVector,EigsVector,T1);
          p_mR(T1,S10,P4,C6);               
  stop();
   
  f_mR(A);
  f_mR(EigsVector);
  f_mR(T_EigsVector);
  f_mR(EigsValue);   
  f_mR(T1);

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


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

 a=[
+3,+4,+8;
+4,+5,+2;
+8,+2,+7]

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

 Press return to continue. 


 EignVector:
   +0.5998    -0.0428    +0.7990 
   +0.3833    +0.8919    -0.2400 
   +0.7023    -0.4502    -0.5514 

 EigsValue : T_EigsVector * A * EigsVector
  +14.9237    +0.0000    -0.0000 
   +0.0000    +3.7985    -0.0000 
   -0.0000    -0.0000    -3.7222 

 T_EigsVector * EigsVector = IDE
   +1.0000    +0.0000    +0.0000 
   +0.0000    +1.0000    +0.0000 
   +0.0000    +0.0000    +1.0000 

 Press return to continue.