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.294964029,+0.000000000, +0.007194245,+0.359712230, +0.244604317,+0.136690647, 
+0.007194245,-0.359712230, +0.438848921,+0.000000000, +0.172661871,-0.294964029, 
+0.244604317,-0.136690647, +0.172661871,+0.294964029, +0.266187050,+0.000000000, 
};
  
double v[RCA*(RCA*C2)] ={   
+0.474100764,+0.264938661, -0.015463508,-0.773175333, -0.601228678,-0.335980732, 
+0.334659363,-0.571709744, +0.634003773,+0.000000000, +0.000000000,+0.000000000,
+0.515933184,+0.000000000,  +0.000000000,+0.000000000, +0.725011051,+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érifier les calculs.


Exemple de sortie écran :
 A :
 +0.2950+0.0000i  +0.0072+0.3597i  +0.2446+0.1367i 
 +0.0072-0.3597i  +0.4388+0.0000i  +0.1727-0.2950i 
 +0.2446-0.1367i  +0.1727+0.2950i  +0.2662+0.0000i 

 V :
 +0.4741+0.2649i  -0.0155-0.7732i  -0.6012-0.3360i 
 +0.3347-0.5717i  +0.6340+0.0000i  +0.0000+0.0000i 
 +0.5159+0.0000i  +0.0000+0.0000i  +0.7250+0.0000i 

 invV :
 +0.4741-0.2649i  +0.3347+0.5717i  +0.5159+0.0000i 
 -0.0113+0.5674i  +0.8851-0.0000i  -0.2723+0.4652i 
 -0.3374+0.1885i  -0.2382-0.4068i  +1.0121-0.0000i 

 Press return to continue. 


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

 A :
 +0.2950+0.0000i  +0.0072+0.3597i  +0.2446+0.1367i 
 +0.0072-0.3597i  +0.4388+0.0000i  +0.1727-0.2950i 
 +0.2446-0.1367i  +0.1727+0.2950i  +0.2662+0.0000i 

 A = V * EigsValue * invV
 +0.2950-0.0000i  +0.0072+0.3597i  +0.2446+0.1367i 
 +0.0072-0.3597i  +0.4388+0.0000i  +0.1727-0.2950i 
 +0.2446-0.1367i  +0.1727+0.2950i  +0.2662+0.0000i 

 Press return to continue.