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-2      
#define RCA           RC4  
/* ------------------------------------ */       
/* ------------------------------------ */
double f(
double x)
{  
        return((x)*(x)*(x));
}
char  feq[] =  "(x)**3";
/* ------------------------------------ */
/* ------------------------------------ */
void fun(void)
{
double **A             = rcsymmetric_mRZ(i_mZ(RCA,RCA),99.);
double **A_p3          =                 i_mZ(RCA,RCA);

double **EigsVector    =                 i_mZ(RCA,RCA);
double **T_EigsVector  =                 i_mZ(RCA,RCA);

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

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

  clrscrn();
  printf(" A ");   
  p_mRZ(A, S8,P0, C6);   
 
  eigs_V_mZ(A,EigsVector,FACTOR_E);
  transpose_mZ(EigsVector,T_EigsVector);
      
/* EigsValue : T_EigsVector * A * EigsVector */
  mul_mZ(T_EigsVector,A,T1);
  mul_mZ(T1,EigsVector,EigsValue);     
  
  f_eigs_mZ(f,EigsValue,f_EigsValue);

//A == EigsVector * EigsValue * T_EigsVector       
  mul_mZ(EigsVector,f_EigsValue,T1);
  mul_mZ(T1,T_EigsVector,A_p3); 
   
  printf(" A**3 : EigsVector * EigsValue**3 * T_EigsVector\n");
  pE_mRZ(A_p3,S12,P4,C6);     
  
  printf(" A**3");  
  pE_mRZ(pow_mZ(3,A,T1),S12,P4,C6);   
   
  f_mZ(A);
  f_mZ(A_p3);
    
  f_mZ(EigsVector);
  f_mZ(T_EigsVector);
  
  f_mZ(EigsValue);
  f_mZ(f_EigsValue);    
     
  f_mZ(T1);
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));

do
{
  fun();

} while(stop_w());

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


              A**2 == V * EValue**2 * T_V


Exemple de sortie écran :
 ------------------------------------
 A 
  +19679    -3684     -402    +1638 
   -3684   +23970   +10621    -1910 
    -402   +10621    +6238    -2663 
   +1638    -1910    -2663   +10547 

 A**3 : EigsVector * EigsValue**3 * T_EigsVector

 +8.6797e+12  -6.2015e+12  -2.4385e+12  +1.7337e+12 
 -6.2015e+12  +2.1177e+13  +9.8603e+12  -3.5504e+12 
 -2.4385e+12  +9.8603e+12  +4.6655e+12  -1.8293e+12 
 +1.7337e+12  -3.5504e+12  -1.8293e+12  +1.7755e+12 

 A**3
 +8.6797e+12  -6.2015e+12  -2.4385e+12  +1.7337e+12 
 -6.2015e+12  +2.1177e+13  +9.8603e+12  -3.5504e+12 
 -2.4385e+12  +9.8603e+12  +4.6655e+12  -1.8293e+12 
 +1.7337e+12  -3.5504e+12  -1.8293e+12  +1.7755e+12 


 Press return to continue
 Press X      to stop