Application


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-1
#define RCA          RC3 
/* ------------------------------------ */       
/* ------------------------------------ */
void fun(void)
{
double a[RCA*(RCA*C2)] ={   
+1.344121661,+0.000000000, -0.056736206,-0.111717684, -0.178397348,+0.422109573, 
-0.056736206,+0.111717684, +1.045622928,+0.000000000, -0.107623318,-0.127510236, 
-0.178397348,-0.422109573, -0.107623318,+0.127510236, +1.610255410,+0.000000000};
  
double v[RCA*(RCA*C2)] ={  
/*	 This is the copy of V1 and V2 of the last files
            V1                                      V2 */	 
-0.228366594,+0.540342817, +0.154922408,+0.305053400, +0.311295176,-0.736561811, 
-0.137768700,-0.163225960, +0.939649653,+0.000000000, +0.000000000,+0.000000000, 
+0.781188460,+0.000000000, +0.000000000,+0.000000000, +0.600476487,+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;
}
/* ------------------------------------ */
/* ------------------------------------ */


Sauver le dernier vecteurs propres, et vérifier les calculs


Exemple de sortie écran :
 A :
 +1.3441+0.0000i  -0.0567-0.1117i  -0.1784+0.4221i 
 -0.0567+0.1117i  +1.0456+0.0000i  -0.1076-0.1275i 
 -0.1784-0.4221i  -0.1076+0.1275i  +1.6103+0.0000i 

 V :
 -0.2284+0.5403i  +0.1549+0.3051i  +0.3113-0.7366i 
 -0.1378-0.1632i  +0.9396+0.0000i  +0.0000+0.0000i 
 +0.7812+0.0000i  +0.0000+0.0000i  +0.6005+0.0000i 

 invV :
 -0.2284-0.5403i  -0.1378+0.1632i  +0.7812+0.0000i 
 +0.0604-0.1189i  +1.0157+0.0000i  +0.1145+0.1357i 
 +0.2971+0.7030i  +0.1792-0.2123i  +0.6491-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    +1.00 -0.00i 

 A :
 +1.3441+0.0000i  -0.0567-0.1117i  -0.1784+0.4221i 
 -0.0567+0.1117i  +1.0456+0.0000i  -0.1076-0.1275i 
 -0.1784-0.4221i  -0.1076+0.1275i  +1.6103+0.0000i 

 A = V * EigsValue * invV
 +1.3441-0.0000i  -0.0567-0.1117i  -0.1784+0.4221i 
 -0.0567+0.1117i  +1.0456+0.0000i  -0.1076-0.1275i 
 -0.1784-0.4221i  -0.1076+0.1275i  +1.6103+0.0000i 

 Press return to continue.