Aller au contenu

Mathc complexes/a159

Un livre de Wikilivres.


Application


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


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

int c = TheCorrect_C(CA+C1);

nb_Z B;

  clrscrn();
  printf(" Ab :");
  p_mZ(Ab, S8,P2, S6,P2, C4); 
  stop();

  clrscrn();   
  printf("    zx   zx   zx   zx*B   zx   \n"
         "    zx   zx   zx   zx*B   zx   \n" 
         "     0    0    0   z1*B   z2 \n\n" 
         "       z1*B  + z2 != 0       \n\n"       
 
         " The system is not compatible :");  
  p_mZ(gj_PP_mZ(Ab), S10,P4, S6,P4, C4); 
  stop();

  clrscrn();  
  B =  div_Z(sym_Z(i_Z(-2,+7)), i_Z(+18,+3));

  printf(
  "    zx   zx   zx   zx*B   zx   \n"
  "    zx   zx   zx   zx*B   zx   \n" 
  "     0    0    0   z1*B   z2   \n" 
  "       z1*B  + z2 != 0         \n"       
  " The system is not compatible :\n\n" 
    
  "    zx   zx   zx   zx*B   zx   \n"
  "    zx   zx   zx   zx*B   zx   \n" 
  "     0    0    0   z1    -z1   \n"   
  
  " With  B = -z2/z1 = "); p_Z(B,S3,P4,S3,P4); printf("\n");
  
  mulC_mZ(Ab,B,c);

  printf(" The system is compatible :\n\n");  
  p_mZ(Ab, S10,P4, S4,P4, C4);
  
  stop();
  
  f_mZ(Ab);
}
/* ------------------------------------ */
int main(void)
{

  fun();

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


 Calculer la valeur de B pour que le système soit compatible.


Exemple de sortie écran :
 Ab :
   +2.00 -8.00i    +7.00 -4.00i    -9.00 -1.00i    +6.00 -2.00i 
   +2.00 -8.00i    +7.00 -4.00i    +9.00 +2.00i    +4.00 +5.00i 

 Press return to continue. 


    zx   zx   zx   zx*B   zx   
    zx   zx   zx   zx*B   zx   
     0    0    0   z1*B   z2 

       z1*B  + z2 != 0       

 The system is not compatible :
   +1.0000+0.0000i    +0.6765+0.7059i    -0.1471-1.0882i    +0.4118+0.6471i 
   +0.0000+0.0000i    +0.0000+0.0000i   +18.0000+3.0000i    -2.0000+7.0000i 

 Press return to continue. 


    zx   zx   zx   zx*B   zx   
    zx   zx   zx   zx*B   zx   
     0    0    0   z1*B   z2   
       z1*B  + z2 != 0         
 The system is not compatible :

    zx   zx   zx   zx*B   zx   
    zx   zx   zx   zx*B   zx   
     0    0    0   z1    -z1   
 With  B = -z2/z1 = +0.0450-0.3964i 
 The system is compatible :


   +1.0000+0.0000i    +0.6765+0.7059i    -0.4380+0.0093i    +0.4118+0.6471i 
   +0.0000+0.0000i    +0.0000+0.0000i    +2.0000-7.0000i    -2.0000+7.0000i 

 Press return to continue.