Valeurs propres


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


c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define FACTOR_E    +1.E-2         
#define RCA          RC3  
/* ------------------------------------ */       
/* ------------------------------------ */
void fun(void)
{                          
double a[RCA*(RCA*C2)] ={   
 +26191,+1471,   -3444,+9191,   +18535, -3803,
  -3444,-9191,  +27183,+1470,    -3591, -9206,
 +18535,+3803,   -3591,+9206,   +29984, +5471};
                       
double **A =     ca_A_mZ(a, i_mZ(RCA,RCA));
double **V =                i_mZ(RCA,RCA);
double **EigsValue  =       i_mZ(RCA,C1);

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

  eigs_V_mZ(A,V,FACTOR_E);
  printf(" V :");
  pE_mZ(V, S12,P4, S12,P4, C3); 

  eigs_mZ(A,EigsValue);
  printf(" EigsValue :");
  pE_mZ(EigsValue, S12,P4, S12,P4, C4);
  stop();
    
  f_mZ(A);
  f_mZ(V);    
  f_mZ(EigsValue);
}
/* ------------------------------------ */
int main(void)
{
    fun();

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


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

 a=[
+26191+1471*i,-3444+9191*i,+18535-3803*i;
-3444-9191*i,+27183+1470*i,-3591-9206*i;
+18535+3803*i,-3591+9206*i,+29984+5471*i]

 format short e
 [V, E]  = eigs (a,3)

 V :
 +5.8221e-01 -1.5613e-01i  +1.7560e-01 -2.7263e-01i  -7.4729e-01 +9.4269e-02i 
 -2.3974e-01 -3.8731e-01i  +5.8534e-01 +6.4006e-01i  -5.6935e-02 -3.4027e-02i 
 +6.5512e-01 +0.0000e+00i  +3.7754e-01 -2.1234e-17i  +6.5443e-01 +4.5410e-18i 

 EigsValue :
 +5.4119e+04 +3.1875e+03i 
 +2.0177e+04 +2.0404e+03i 
 +9.0622e+03 +3.1841e+03i 

 Press return to continue.