Aller au contenu

Mathc complexes/a168

Un livre de Wikilivres.


Application


Installer et compiler ces fichiers dans votre répertoire de travail.


c00c.c
/* ------------------------------------ */
/*  Save as :   c00c.c                  */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */  
#define RAb          R3  
#define CA           R3
#define Cb           R3
/* ------------------------------------ */
/* ------------------------------------ */
void fun(void)
{
double ab[RAb*((CA+Cb)*C2)] ={   
  -4,-2,   -1,-2,   +3,-2,   +6,+1,   +1,-9,   +1,-9, 
  -8,-4,   -2,-4,   +6,-4,   +0,+1,   +1,-0,   -8,+7, 
  -4,-2,   -1,-2,   +3,-2,   -4,-0,   +0,-3,   +0,-3  };
                          
double **Ab = ca_A_mZ(ab,i_Abr_Ac_bc_mZ(RAb,CA,Cb));
double **Ab_free =       i_Abr_Ac_bc_mZ(RAb,CA,Cb) ;
double **b_free  =       i_mZ(RAb,C2);

nb_Z B;
nb_Z C;

int c ;

  clrscrn();
  B = i_Z(+0.53196192,-0.35481129);
  c = TheCorrect_C(CA+C1);
  mulC_mZ(Ab,B,c);
  
  C = i_Z(-1.64246855,-0.83866032);
  c = TheCorrect_C(CA+C2);  
  mulC_mZ(Ab,C,c);
    
  printf(" Ab_news :");
  p_mZ(Ab, S8,P2, S6,P2, CA); 
  stop();

  clrscrn();   
  printf("    zx     zx      zx    \n"
         "     0      0       0    \n" 
         "     0      0       0  \n\n" 
         "    zx*B   zx*C   zx     \n"
         "    z1*B   z2*C   z3     \n" 
         "    z1*B   z2*C   z3   \n\n"
         "       z1*B + z2*C + z3 == 0\n\n"       
 
         " The system is  compatible :");   
  p_mZ(gj_PP_mZ(Ab), S10,P4, S8,P4, CA); 
  stop();
  
  f_mZ(Ab);
  f_mZ(Ab_free);
  f_mZ(b_free);
}
/* ------------------------------------ */
int main(void)
{

  fun();

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


 Le système est compatible.


Exemple de sortie écran :
 ------------------------------------ 
 Ab_news :
   -4.00 -2.00i    -1.00 -2.00i    +3.00 -2.00i 
   -8.00 -4.00i    -2.00 -4.00i    +6.00 -4.00i 
   -4.00 -2.00i    -1.00 -2.00i    +3.00 -2.00i 

   +3.55 -1.60i    -9.19+13.94i    +1.00 -9.00i 
   +0.35 +0.53i    -1.64 -0.84i    -8.00 +7.00i 
   -2.13 +1.42i    -2.52 +4.93i    +0.00 -3.00i 

 Press return to continue. 


 ------------------------------------ 
    zx     zx      zx    
     0      0       0    
     0      0       0  

    zx*B   zx*C   zx     
    z1*B   z2*C   z3     
    z1*B   z2*C   z3   

       z1*B + z2*C + z3 == 0

 The system is  compatible :
   +1.0000 +0.0000i    +0.4000 +0.3000i    -0.4000 +0.7000i 
   +0.0000 +0.0000i    +0.0000 +0.0000i    -0.0000 +0.0000i 
   +0.0000 +0.0000i    +0.0000 +0.0000i    -0.0000 +0.0000i 

   -0.0621 -0.0355i    +0.2062 +0.0017i    +0.4500 -1.1000i 
   +3.3692 -1.8629i    -8.3692+14.3629i    +5.0000-12.5000i 
   -2.3053 +1.1533i    -1.6947 +5.3467i    +4.0000 -6.5000i 

 Press return to continue.