Application

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

c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(void)
{
nb_Z zt =    {2,-3};
nb_Z z  = inv_Z(zt);

double  a[R3*(C3*C2)]={ zt.r,zt.i, 9,9, 9,9,
                           9,   9, 9,9, 9,9,
                           9,   9, 9,9, 9,9 };	
                        
double id[R3*(C3*C2)]={ z.r,z.i, 0,0, 0,0,
                          0,  0, 1,0, 0,0,
                          0,  0, 0,0, 1,0 };               
              
double **A  = ca_A_mZ(a, i_mZ(R3,C3));
double **ID = ca_A_mZ(id,i_mZ(R3,C3));

double **AID = mul_mZ(A,ID,i_mZ(R3,C3));

  clrscrn();
  
  printf(" inv("); p_Z(zt,S3,P0,S3,P0); printf(") = "); 
                   p_Z(z,S3,P4,S3,P4); printf("\n\n"); 
                   
  printf(" The pivot = 1  \n\n");
  printf(" ID : Multiply a column by a nonzero constant c.");
  p_mZ(ID, S4,P4, S3,P4, C6);
  printf(" A :");
  p_mZ(A, S4,P4, S3,P4, C6);
  printf(" A ID : ");
  p_mZ(AID, S4,P4, S3,P4, C6);
   
  f_mZ(A);
  f_mZ(ID);
  f_mZ(AID);
}
/* ------------------------------------ */
int main(void)
{

  fun();
  
  stop();

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


mettre le pivot à un


Exemple de sortie écran :

 inv( +2 -3i ) = +0.1538+0.2308i 

 The pivot = 1  

 ID : Multiply a column by a nonzero constant c.
+0.1538+0.2308i +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 

 A :
+2.0000-3.0000i +9.0000+9.0000i +9.0000+9.0000i 
+9.0000+9.0000i +9.0000+9.0000i +9.0000+9.0000i 
+9.0000+9.0000i +9.0000+9.0000i +9.0000+9.0000i 

 A ID : 
+1.0000+0.0000i +9.0000+9.0000i +9.0000+9.0000i 
-0.6923+3.4615i +9.0000+9.0000i +9.0000+9.0000i 
-0.6923+3.4615i +9.0000+9.0000i +9.0000+9.0000i 

 Press return to continue.