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
#define FACTOR_E    +1.E-2
/* ------------------------------------ */         
/* ------------------------------------ */
double f(
double x)
{  
        return(sin(x)*sin(x));
}
char  feq[] =  "sin(x)*sin(x)";
/* ------------------------------------ */
double g(
double x)
{  
        return(cos(x)*cos(x));
}
char  geq[] =  "cos(x)*cos(x)";
/* ------------------------------------ */
/* ------------------------------------ */
void fun(void)
{                          
double **A = rcsymmetric_mZ(i_mZ(RCA,RCA),99);

double **V    =       i_mZ(RCA,RCA);
double **cV_T =       i_mZ(RCA,RCA);

double **T    =       i_mZ(RCA,RCA);

double **EigsValue  = i_mZ(RCA,RCA);

double **sin_EValue = i_mZ(RCA,RCA);
double **cos_EValue = i_mZ(RCA,RCA);

double **sin_A =      i_mZ(RCA,RCA);
double **cos_A =      i_mZ(RCA,RCA);

  clrscrn();
  printf(" A :");
  p_mZ(A, S7,P0, S7,P0, C6);
  stop();

  clrscrn();
  eigs_V_mZ(A,V,FACTOR_E);
  ctranspose_mZ(V,cV_T);
    
/* EigsValue = cV_T * A * V */   
  mul_mZ(cV_T,A,T);
  mul_mZ(T,V,EigsValue); 
   
  f_eigs_mZ(f,EigsValue,sin_EValue); 
  f_eigs_mZ(g,EigsValue,cos_EValue);   

/* sin**2 = V * sin_EValue * cV_T*/     
  mul_mZ(V,sin_EValue,T);
  mul_mZ(T,cV_T,sin_A);   
  printf(" sin(A)**2");
  p_mZ(sin_A, S7,P3, S7,P3, C6);
       
/* cos**2 = V * cos_EValue * cV_T*/     
  mul_mZ(V,cos_EValue,T);
  mul_mZ(T,cV_T,cos_A);
  printf(" cos(A)**2");
  p_mZ(cos_A, S7,P3, S7,P3, C6);  

  add_mZ(sin_A,cos_A,A);
  printf(" sin(A)**2 + cos(A)**2 = 1");
  p_mZ(A, S7,P3, S7,P3, C6);
   
  f_mZ(A);
  f_mZ(V);
  f_mZ(cV_T);
  f_mZ(T);
  
  f_mZ(EigsValue);
  
  f_mZ(sin_EValue);
  f_mZ(cos_EValue);
  f_mZ(sin_A);
  f_mZ(cos_A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));

do
{
    fun();
    
} while(stop_w());

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


Avec les matrices réelles nous avons calculer les vecteurs et valeurs propres des matrices symétriques. Avec les matrices complexes nous allons calculer les vecteurs et valeurs propres des matrices symétriques conjuguées.


Contrôle du facteur :

  • FACTOR_E ..... +1.E-1 ......... -9 < x < 9
  • FACTOR_E ..... +1.E-2 ....... -99 < x < 99
  • FACTOR_E ..... +1.E-3 ..... -999 < x < 999


Nous allons étudier une des propriétés des valeurs propres et des vecteurs propres :

              sin(A)**2 + cos(A)**2 = 1


Exemple de sortie écran :
 ------------------------------------
 A :
 +40842     +0i  +14767  +5544i   +4065 -14715i  +30802 +17838i   +4683  -4268i 
 +14767  -5544i  +27510     +0i   +1040 -11560i   +9180  +3020i  +10357 +11533i 
  +4065 +14715i   +1040 +11560i  +49349     +0i   -1839 +12863i  +17159  -6826i 
 +30802 -17838i   +9180  -3020i   -1839 -12863i  +39734     +0i   -3698  -6953i 
  +4683  +4268i  +10357 -11533i  +17159  +6826i   -3698  +6953i  +30380     +0i 

 Press return to continue. 


 ------------------------------------
 sin(A)**2
 +0.271 -0.000i  -0.202 +0.038i  -0.087 +0.128i  -0.084 -0.073i  +0.080 -0.110i 
 -0.202 -0.038i  +0.465 -0.000i  -0.010 -0.247i  -0.239 +0.052i  -0.019 +0.061i 
 -0.087 -0.128i  -0.010 +0.247i  +0.399 -0.000i  +0.135 -0.194i  -0.245 +0.113i 
 -0.084 +0.073i  -0.239 -0.052i  +0.135 +0.194i  +0.396 -0.000i  -0.130 +0.008i 
 +0.080 +0.110i  -0.019 -0.061i  -0.245 -0.113i  -0.130 -0.008i  +0.256 +0.000i 

 cos(A)**2
 +0.729 +0.000i  +0.202 -0.038i  +0.087 -0.128i  +0.084 +0.073i  -0.080 +0.110i 
 +0.202 +0.038i  +0.535 +0.000i  +0.010 +0.247i  +0.239 -0.052i  +0.019 -0.061i 
 +0.087 +0.128i  +0.010 -0.247i  +0.601 -0.000i  -0.135 +0.194i  +0.245 -0.113i 
 +0.084 -0.073i  +0.239 +0.052i  -0.135 -0.194i  +0.604 -0.000i  +0.130 -0.008i 
 -0.080 -0.110i  +0.019 +0.061i  +0.245 +0.113i  +0.130 +0.008i  +0.744 -0.000i 

 sin(A)**2 + cos(A)**2 = 1
 +1.000 -0.000i  -0.000 +0.000i  +0.000 -0.000i  -0.000 -0.000i  -0.000 -0.000i 
 -0.000 -0.000i  +1.000 +0.000i  +0.000 +0.000i  -0.000 -0.000i  +0.000 +0.000i 
 +0.000 +0.000i  +0.000 -0.000i  +1.000 -0.000i  -0.000 +0.000i  -0.000 +0.000i 
 -0.000 +0.000i  +0.000 +0.000i  -0.000 -0.000i  +1.000 -0.000i  -0.000 -0.000i 
 -0.000 +0.000i  +0.000 -0.000i  -0.000 -0.000i  -0.000 +0.000i  +1.000 +0.000i 


 Press return to continue
 Press X      to stop