Aller au contenu

Mathc complexes/02z

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.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 **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 (Rappel  : A v_λ = λ v_λ).


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 

 V3 :
   +0.5588 +0.2286i 
   -0.0762 +0.6096i 
   +0.5080 +0.0000i 

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

 Press return to continue.