Application

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

c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int rc)
{
double **A      =         r_mZ(     i_mZ(rc,rc),9);
double **invA   =       inv_mZ(A,   i_mZ(rc,rc));
double **A_T    = transpose_mZ(A,   i_mZ(rc,rc));
double **invA_T =       inv_mZ(A_T, i_mZ(rc,rc));
double **IDE    =                   i_mZ(rc,rc);

  clrscrn();
  printf(" A : ");
  p_mZ(A, S5,P4, S4,P4, C6);
  printf(" invA : ");
  p_mZ(invA, S5,P4, S4,P4, C6);
  printf(" A * invA : ");
  p_mZ(mul_mZ(A,invA,IDE), S5,P4, S4,P4, C6);
  stop();

  clrscrn();
  printf(" A_T : Transpose");
  p_mZ(A_T, S5,P4, S4,P4, C6);
  printf(" invA_T : ");
  p_mZ(invA_T, S5,P4, S4,P4, C6);
  printf(" A_T * invA_T : ");
  p_mZ(mul_mZ(A_T,invA_T,IDE), S5,P4, S4,P4, C6); 
  stop();

  clrscrn();
  printf(" invA : ");
  p_mZ(invA, S5,P4, S4,P4, C6);
  printf(" invA_T : ");
  p_mZ(invA_T, S5,P4, S4,P4, C6);
      
  f_mZ(A);
  f_mZ(invA);
  f_mZ(A_T);
  f_mZ(invA_T);
  f_mZ(IDE);
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));
  
   do 
         fun(rp_I(RC3)+RC1);
        
    while(stop_w());
        
  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */


L'inverse de la transposée d'une matrice est égale à la transposée de l'inverse de la matrice

Exemple de sortie écran :

 A : 
-1.0000-1.0000i +3.0000+7.0000i +4.0000-8.0000i 
+3.0000-8.0000i -5.0000+2.0000i -1.0000+1.0000i 
-6.0000-8.0000i -2.0000+8.0000i -7.0000+1.0000i 

 invA : 
+0.0686-0.0085i +0.1275+0.1765i -0.0010-0.0904i 
+0.0566-0.0931i +0.1667+0.0000i -0.0827-0.1058i 
+0.0185+0.0228i +0.0588-0.0980i -0.1007-0.0001i 

 A * invA : 
+1.0000+0.0000i -0.0000+0.0000i -0.0000+0.0000i 
+0.0000+0.0000i +1.0000-0.0000i -0.0000+0.0000i 
+0.0000+0.0000i -0.0000-0.0000i +1.0000+0.0000i 

 Press return to continue. 


 A_T : Transpose
-1.0000-1.0000i +3.0000-8.0000i -6.0000-8.0000i 
+3.0000+7.0000i -5.0000+2.0000i -2.0000+8.0000i 
+4.0000-8.0000i -1.0000+1.0000i -7.0000+1.0000i 

 invA_T : 
+0.0686-0.0085i +0.0566-0.0931i +0.0185+0.0228i 
+0.1275+0.1765i +0.1667+0.0000i +0.0588-0.0980i 
-0.0010-0.0904i -0.0827-0.1058i -0.1007-0.0001i 

 A_T * invA_T : 
+1.0000-0.0000i +0.0000-0.0000i +0.0000+0.0000i 
-0.0000+0.0000i +1.0000+0.0000i +0.0000-0.0000i 
+0.0000+0.0000i -0.0000-0.0000i +1.0000+0.0000i 

 Press return to continue. 


 invA : 
+0.0686-0.0085i +0.1275+0.1765i -0.0010-0.0904i 
+0.0566-0.0931i +0.1667+0.0000i -0.0827-0.1058i 
+0.0185+0.0228i +0.0588-0.0980i -0.1007-0.0001i 

 invA_T : 
+0.0686-0.0085i +0.0566-0.0931i +0.0185+0.0228i 
+0.1275+0.1765i +0.1667+0.0000i +0.0588-0.0980i 
-0.0010-0.0904i -0.0827-0.1058i -0.1007-0.0001i 


 Press   return to continue
 Press X return to stop