Application


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


c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define RCA          RC5      
/* ------------------------------------ */
void fun(void)
{
double a[RCA*(RCA*C2)] ={   
+33.519963947,-0.000000000, -13.693912818,+6.712740170, +6.614415988,-2.591607122, -14.832764827,-15.560900752, +5.931313432,+7.201798592, 
-13.693912818,-6.712740170, +39.585869431,+0.000000000, -12.477192990,+16.370664567, +8.957620096,-4.146641673, -20.695195874,-8.986119738, 
+6.614415988,+2.591607122, -12.477192990,-16.370664567, +40.575180719,+0.000000000, -10.968623618,-19.349596696, -6.548231731,+8.901841379, 
-14.832764827,+15.560900752, +8.957620096,+4.146641673, -10.968623618,+19.349596696, +41.873262178,-0.000000000, +4.207151243,-10.065003488, 
+5.931313432,-7.201798592, -20.695195874,+8.986119738, -6.548231731,-8.901841379, +4.207151243,+10.065003488, +28.445723725,-0.000000000
};
  
double v[RCA*(RCA*C2)] ={   
+0.118330494,+0.336141,   +0.093613438,-0.468103,   +0.125005241,+0.554878,   -0.189969952,+0.203143, -0.053277761,-0.491339,
-0.312524604,-0.379916,   -0.514166849,-0.060731,   -0.093895517,+0.164111,   +0.266946221,+0.356623, +0.455820840,-0.219031,
-0.179576129,+0.492444,   -0.085553290,-0.062544,   +0.228819473,-0.636431,   -0.236969595,+0.320565, +0.284148056,-0.130235,
-0.286321908,-0.401151,   +0.546800669,+0.033155,   +0.039187632,-0.160639,   +0.024146696,+0.512267, -0.355185070,-0.201272,
+0.336672172,+0.000000,   +0.439020807,+0.000000,   +0.394959418,-0.000000,   +0.549806742,+0.000000, +0.485419596,+0.000000
};
                         
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, S10,P4, S8,P4, C4); 
  stop();
  
  clrscrn();
  printf(" V :");
  p_mZ(V, S10,P4, S8,P4, C4); 
  stop();
  
  clrscrn();  
  printf(" invV :");
  p_mZ(invV, S10,P4, S8,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), S10,P4, S8,P4, C4); 
  stop();
  
  clrscrn(); 
  printf(" A :");
  p_mZ(A, S10,P4, S8,P4, C4); 
  stop();
  
  clrscrn();  
  printf(" A = V * EigsValue * invV");
  mul_mZ(V,EigsValue,T);
  mul_mZ(T,invV,A); 
    p_mZ(A, S10,P4, S8,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 :
  +33.5200 -0.0000i   -13.6939 +6.7127i    +6.6144 -2.5916i   -14.8328-15.5609i 
  -13.6939 -6.7127i   +39.5859 +0.0000i   -12.4772+16.3707i    +8.9576 -4.1466i 
   +6.6144 +2.5916i   -12.4772-16.3707i   +40.5752 +0.0000i   -10.9686-19.3496i 
  -14.8328+15.5609i    +8.9576 +4.1466i   -10.9686+19.3496i   +41.8733 -0.0000i 
   +5.9313 -7.2018i   -20.6952 +8.9861i    -6.5482 -8.9018i    +4.2072+10.0650i 

   +5.9313 +7.2018i 
  -20.6952 -8.9861i 
   -6.5482 +8.9018i 
   +4.2072-10.0650i 
  +28.4457 -0.0000i 

 Press return to continue. 


 V :
   +0.1183 +0.3361i    +0.0936 -0.4681i    +0.1250 +0.5549i    -0.1900 +0.2031i 
   -0.3125 -0.3799i    -0.5142 -0.0607i    -0.0939 +0.1641i    +0.2669 +0.3566i 
   -0.1796 +0.4924i    -0.0856 -0.0625i    +0.2288 -0.6364i    -0.2370 +0.3206i 
   -0.2863 -0.4012i    +0.5468 +0.0332i    +0.0392 -0.1606i    +0.0241 +0.5123i 
   +0.3367 +0.0000i    +0.4390 +0.0000i    +0.3950 -0.0000i    +0.5498 +0.0000i 

   -0.0533 -0.4913i 
   +0.4558 -0.2190i 
   +0.2841 -0.1302i 
   -0.3552 -0.2013i 
   +0.4854 +0.0000i 

 Press return to continue. 


 invV :
   +0.1183 -0.3361i    -0.3125 +0.3799i    -0.1796 -0.4924i    -0.2863 +0.4012i 
   +0.0936 +0.4681i    -0.5142 +0.0607i    -0.0856 +0.0625i    +0.5468 -0.0332i 
   +0.1250 -0.5549i    -0.0939 -0.1641i    +0.2288 +0.6364i    +0.0392 +0.1606i 
   -0.1900 -0.2031i    +0.2669 -0.3566i    -0.2370 -0.3206i    +0.0241 -0.5123i 
   -0.0533 +0.4913i    +0.4558 +0.2190i    +0.2841 +0.1302i    -0.3552 +0.2013i 

   +0.3367 -0.0000i 
   +0.4390 -0.0000i 
   +0.3950 -0.0000i 
   +0.5498 +0.0000i 
   +0.4854 +0.0000i 

 Press return to continue. 


 EigsValue : invV * A * V
  +92.0000 -0.0000i    +0.0000 +0.0000i    +0.0000 +0.0000i    +0.0000 +0.0000i 
   +0.0000 +0.0000i   +52.0000 -0.0000i    +0.0000 +0.0000i    +0.0000 +0.0000i 
   +0.0000 +0.0000i    +0.0000 +0.0000i   +28.0000 -0.0000i    +0.0000 +0.0000i 
   +0.0000 +0.0000i    +0.0000 +0.0000i    +0.0000 +0.0000i   +12.0000 +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 
   +0.0000 +0.0000i 
   +0.0000 +0.0000i 
   +0.0000 +0.0000i 

 Press return to continue. 


 A :
  +33.5200 -0.0000i   -13.6939 +6.7127i    +6.6144 -2.5916i   -14.8328-15.5609i 
  -13.6939 -6.7127i   +39.5859 +0.0000i   -12.4772+16.3707i    +8.9576 -4.1466i 
   +6.6144 +2.5916i   -12.4772-16.3707i   +40.5752 +0.0000i   -10.9686-19.3496i 
  -14.8328+15.5609i    +8.9576 +4.1466i   -10.9686+19.3496i   +41.8733 -0.0000i 
   +5.9313 -7.2018i   -20.6952 +8.9861i    -6.5482 -8.9018i    +4.2072+10.0650i 

   +5.9313 +7.2018i 
  -20.6952 -8.9861i 
   -6.5482 +8.9018i 
   +4.2072-10.0650i 
  +28.4457 -0.0000i 

 Press return to continue. 


 A = V * EigsValue * invV
  +33.5200 +0.0000i   -13.6939 +6.7127i    +6.6144 -2.5916i   -14.8328-15.5609i 
  -13.6939 -6.7127i   +39.5859 +0.0000i   -12.4772+16.3707i    +8.9576 -4.1467i 
   +6.6144 +2.5916i   -12.4772-16.3707i   +40.5752 +0.0000i   -10.9686-19.3496i 
  -14.8328+15.5609i    +8.9576 +4.1466i   -10.9686+19.3496i   +41.8732 -0.0000i 
   +5.9313 -7.2018i   -20.6952 +8.9861i    -6.5482 -8.9018i    +4.2071+10.0650i 

   +5.9313 +7.2018i 
  -20.6952 -8.9861i 
   -6.5482 +8.9018i 
   +4.2072-10.0650i 
  +28.4457 -0.0000i 

 Press return to continue.