Aller au contenu

Mathc complexes/03g

Un livre de Wikilivres.


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  
#define EVALUE       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 **V3  =  c_c_mZ(V,EVALUE, i_mZ(RCA, C1),C1);
double **AV3 =  mul_mZ(A,V3,     i_mZ(RCA, C1)); 
                       
  clrscrn();
  printf(" A :");
  p_mZ(A, S10,P4, S8,P4, C4); 

  printf(" V :");
  p_mZ(V, S10,P4, S8,P4, C4); 

  printf(" V%d :",EVALUE);
  p_mZ(V3, S10,P4, S8,P4, C4); 

  printf(" A * V%d :",EVALUE);
  p_mZ(AV3, S10,P4, S8,P4, C4); 
  stop();
            
  f_mZ(A);
  f_mZ(V);  
  f_mZ(V3);
  f_mZ(AV3);
}
/* ------------------------------------ */
int main(void)
{
  fun();

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


Vérifier A v_λ = 0 quand λ = 0 (Ici : λ2 et λ3).


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 

 V3 :
   -0.6012 -0.3360i 
   +0.0000 +0.0000i 
   +0.7250 +0.0000i 

 A * V3 :
   -0.0000 -0.0000i 
   -0.0000 +0.0000i 
   -0.0000 -0.0000i 

 Press return to continue.