Application

Installer et compiler ce fichier dans votre répertoire de travail.

c00a.c
/* ------------------------------------ */
/*  Save as :  c00a.c                   */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define  TAB  R4 
#define  RCA  R3  
/* ------------------------------------ */
void fun(void)
{
double **A[TAB];
double **P[TAB];
double **InvP[TAB];

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

  for(c=C0; c<TAB; c++)
     {   
         A[c] = i_mZ(RCA,RCA); 
         P[c] = r_mZ(i_mZ(RCA,RCA),99); 
      InvP[c] = inv_mZ(P[c],i_mZ(RCA,RCA));       
	   } 

  rcsymmetric_mZ(A[0],99);
  
    for(c=C0; c<(TAB-C1); c++)
     {   
        mul_mZ(InvP[c],A[c],T); 
        mul_mZ(T,P[c],A[c+C1]);
	   } 

  clrscrn();
  for(c=C0; c<TAB; c++)
     {
	  printf(" A[%d] : \t\t\t det =  ",c);
      p_Z(det_Z(A[c]), S4,P2, S5,P2);  
      p_mZ(A[c],S10,P2,S10,P2,C6); 
     } 

  for(c=C0; c<TAB; c++)
     { 
	   f_mZ(A[c]);
	   f_mZ(P[c]);		 
	   f_mZ(InvP[c]); 
	   }
	   
  f_mZ(T);       
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));
  
  do{
        fun();
        
  }while(stop_w());

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


Je crée une suite de quatre Matrices semblables.


Exemple de sortie écran :

 -------------------------------------------
 A[0] : 			 det =  +2008178808073.00-0.00i 
 +25381.00     +0.00i   +1329.00   -233.00i  -11981.00  -2329.00i 
  +1329.00   +233.00i   +8160.00     +0.00i   -5113.00  -4290.00i 
 -11981.00  +2329.00i   -5113.00  +4290.00i  +20199.00     +0.00i 

 A[1] : 			 det =  +2008178808073.00-0.00i 
 +44414.31  +1277.23i    +747.00  +3978.68i  +22780.44 -14814.98i 
 +20519.40  +3026.18i  +13262.19     +8.88i  +17291.43 -10637.07i 
  -7961.31 -15079.35i   +1123.23  +5303.62i   -3936.50  -1286.11i 

 A[2] : 			 det =  +2008178808072.98-0.00i 
  +2081.46 +17072.73i  +18615.79  +1511.54i  -14080.98  +8706.07i 
 -12544.86+107681.12i  +75209.43 -39393.21i  -10263.09 +50499.01i 
 -59430.88 +49984.20i  +55716.94 +12194.14i  -23550.89 +22320.48i 

 A[3] : 			 det =  +2008178808073.00-0.01i 
  -1774.77 +11102.99i   +9498.30  +9437.72i   -5296.89 -23049.14i 
  +1401.00 -33144.16i  -17005.94  -5981.87i  +29042.73 +35419.18i 
 -28941.68 -31039.30i  -27489.08 +25242.27i  +72520.71  -5121.12i 


 Press   return to continue
 Press X return to stop