Application


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


c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define RCA          RC3        
/* ------------------------------------ */
void fun(void)
{
double a[RCA*(RCA*C2)] ={   
+0.651225366,+0.000000000,-0.158846132,+0.418635744,-0.237811929,-0.039640695,
-0.158846132,-0.418635744,+1.100413236,+0.000000000,+0.151406646,-0.788515806,
-0.237811929,+0.039640695,+0.151406646,+0.788515806,+1.248361398,+0.000000000
};
  
double v[RCA*(RCA*C2)] ={   
+0.064722742,+0.107482377, -0.679856941,-0.396909204, +0.558800558,+0.228600229,
+0.158363201,-0.672869740, -0.152458922,+0.348574714, -0.076200077,+0.609600610,
+0.711636083,+0.000000000, +0.485293282,+0.000000000, +0.508000508,+0.000000000
};
                         
double **A         =  ca_A_mZ(a, i_mZ(RCA,RCA));
double **V         =  ca_A_mZ(v, i_mZ(RCA,RCA));
double **invV      = invgj_mZ(V, i_mZ(RCA,RCA));
double **T         =             i_mZ(RCA,RCA);
double **EigsValue =             i_mZ(RCA,RCA);

  clrscrn();
  printf(" A :");
  p_mZ(A, S8,P4, S6,P4, C4);

  printf(" V :");
  p_mZ(V, S8,P4, S6,P4, C4); 
  printf(" invV :");
  p_mZ(invV, S8,P4, S6,P4, C4);
  stop();

  clrscrn();   
  printf(" EigsValue : invV * A * V");
  mul_mZ(invV,A,T);
  mul_mZ(T,V,EigsValue); 
    p_mZ(clean_eyes_mZ(EigsValue), S8,P2, S6,P2, C4);
 
  printf(" A :");
  p_mZ(A, S8,P4, S6,P4, C4); 
  
  printf(" A = V * EigsValue * invV");
  mul_mZ(V,EigsValue,T);
  mul_mZ(T,invV,A); 
    p_mZ(A, S8,P4, S6,P4, C4); 
  stop();
          
  f_mZ(A);
  f_mZ(V);  
  f_mZ(invV);  
  f_mZ(T);  
  f_mZ(EigsValue);
}
/* ------------------------------------ */
int main(void)
{
  fun();

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


Vérifions les calculs précédents.


Exemple de sortie écran :
 A :
 +0.6512+0.0000i  -0.1588+0.4186i  -0.2378-0.0396i 
 -0.1588-0.4186i  +1.1004+0.0000i  +0.1514-0.7885i 
 -0.2378+0.0396i  +0.1514+0.7885i  +1.2484+0.0000i 

 V :
 +0.0647+0.1075i  -0.6799-0.3969i  +0.5588+0.2286i 
 +0.1584-0.6729i  -0.1525+0.3486i  -0.0762+0.6096i 
 +0.7116+0.0000i  +0.4853+0.0000i  +0.5080+0.0000i 

 invV :
 +0.0647-0.1075i  +0.1584+0.6729i  +0.7116+0.0000i 
 -0.6799+0.3969i  -0.1525-0.3486i  +0.4853-0.0000i 
 +0.5588-0.2286i  -0.0762-0.6096i  +0.5080-0.0000i 

 Press return to continue. 


 EigsValue : invV * A * V
   +2.00 -0.00i    +0.00 +0.00i    +0.00 +0.00i 
   +0.00 +0.00i    +1.00 -0.00i    +0.00 +0.00i 
   +0.00 +0.00i    +0.00 +0.00i    -0.00 +0.00i 

 A :
 +0.6512+0.0000i  -0.1588+0.4186i  -0.2378-0.0396i 
 -0.1588-0.4186i  +1.1004+0.0000i  +0.1514-0.7885i 
 -0.2378+0.0396i  +0.1514+0.7885i  +1.2484+0.0000i 

 A = V * EigsValue * invV
 +0.6512+0.0000i  -0.1588+0.4186i  -0.2378-0.0396i 
 -0.1588-0.4186i  +1.1004-0.0000i  +0.1514-0.7885i 
 -0.2378+0.0396i  +0.1514+0.7885i  +1.2484+0.0000i 

 Press return to continue.