Aller au contenu

Mathc complexes/033

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          RC4 
#define EVALUE       RC4        
/* ------------------------------------ */
void fun(void)
{
double a[RCA*(RCA*C2)] ={   
+36.313679157,+0.000000000, +19.585408427,-0.742196710, -15.875721237,+0.689662875, +8.211253265,+22.976851849, 
+19.585408427,+0.742196710, +63.726719706,+0.000000000, +10.890345307,+2.396948766, -1.434784341,+15.056472852, 
-15.875721237,-0.689662875, +10.890345307,-2.396948766, +16.126426155,-0.000000000, -3.467769379,-0.518070163, 
+8.211253265,-22.976851849, -1.434784341,-15.056472852, -3.467769379,+0.518070163, +55.833174982,+0.000000000  
};
  
double v[RCA*(RCA*C2)] ={   
+0.112347739,+0.473151, +0.275127445,+0.194004,  -0.301211051,-0.467615,   -0.133705254,-0.568247, 
+0.027862928,+0.639967, -0.193879507,-0.664478,  +0.124167152,-0.150010,   +0.033426314,+0.267411, 
-0.022126148,-0.013101, -0.269834693,-0.287164,  +0.282181526,+0.453629,   -0.133705254,-0.735379, 
+0.593726724,-0.000000, +0.502268472,+0.000000,  +0.606037951,-0.000000,   +0.167131568,-0.000000
};
                         
double **A   = ca_A_mZ(a,        i_mZ(RCA,RCA));
double **V   = ca_A_mZ(v,        i_mZ(RCA,RCA));
double **V4  =  c_c_mZ(V,EVALUE, i_mZ(RCA, C1),C1);
double **AV4 =  mul_mZ(A,V4,     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); 
  stop();
  
  clrscrn();
  printf(" V%d :",EVALUE);
  p_mZ(V4, S10,P4, S8,P4, C4); 

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

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


Vérifier A v_λ = 0 quand λ = 0 (Rappel  : A v_λ = λ v_λ)


Exemple de sortie écran :
 A :
  +36.3137 +0.0000i   +19.5854 -0.7422i   -15.8757 +0.6897i    +8.2113+22.9769i 
  +19.5854 +0.7422i   +63.7267 +0.0000i   +10.8903 +2.3969i    -1.4348+15.0565i 
  -15.8757 -0.6897i   +10.8903 -2.3969i   +16.1264 -0.0000i    -3.4678 -0.5181i 
   +8.2113-22.9769i    -1.4348-15.0565i    -3.4678 +0.5181i   +55.8332 +0.0000i 

 V :
   +0.1123 +0.4732i    +0.2751 +0.1940i    -0.3012 -0.4676i    -0.1337 -0.5682i 
   +0.0279 +0.6400i    -0.1939 -0.6645i    +0.1242 -0.1500i    +0.0334 +0.2674i 
   -0.0221 -0.0131i    -0.2698 -0.2872i    +0.2822 +0.4536i    -0.1337 -0.7354i 
   +0.5937 -0.0000i    +0.5023 +0.0000i    +0.6060 -0.0000i    +0.1671 -0.0000i 

 Press return to continue. 


 V4 :
   -0.1337 -0.5682i 
   +0.0334 +0.2674i 
   -0.1337 -0.7354i 
   +0.1671 -0.0000i 

 A * V4 :
   +0.0000 +0.0000i 
   +0.0000 +0.0000i 
   +0.0000 -0.0000i 
   +0.0000 +0.0000i 

 Press return to continue.