Aller au contenu

Mathc complexes/a1164

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          R3  
#define CA           C3
#define Cb           C2
/* ------------------------------------ */
/* ------------------------------------ */
void fun(void)
{
double ab[RAb*((CA+Cb)*C2)] ={   
  +2,-1,   +1,+6,   +3,-9,   +6,+2,   -2,-2, 
  +4,+1,   +5,+3,   -4,-5,   -5,-3,   +5,+5, 
  +2,-1,   +1,+6,   +3,-9,   +2,-1,   +7,-5 };
                          
double **Ab = ca_A_mZ(ab,i_Abr_Ac_bc_mZ(RAb,CA,Cb));

int c = TheCorrect_C(CA+C1);

nb_Z B =  div_Z(sym_Z(i_Z(9,-3)), i_Z(-4,-3));

  clrscrn();
  
  mulC_mZ(Ab,B,c);
  
  printf(" Ab :");
  p_mZ(Ab, S8,P2, S6,P2, CA); 
  stop();

  clrscrn();
  printf(" With  B = -z2/z1 = "); p_Z(B,S3,P4,S3,P4); printf("\n");   
  printf(" The system is compatible :\n\n");   
  p_mZ(gj_PP_mZ(Ab), S10,P4, S6,P4, CA); 
  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 -1.00i    +1.00 +6.00i    +3.00 -9.00i 
   +4.00 +1.00i    +5.00 +3.00i    -4.00 -5.00i 
   +2.00 -1.00i    +1.00 +6.00i    +3.00 -9.00i 

   +9.60 -7.20i    -2.00 -2.00i 
  -10.08 +4.56i    +5.00 +5.00i 
   +0.60 -4.20i    +7.00 -5.00i 

 Press return to continue. 


 ------------------------------------ 
 With  B = -z2/z1 = +1.0800-1.5600i 
 The system is compatible :


   +1.0000+0.0000i    +1.3529+0.4118i    -1.2353-0.9412i 
   +0.0000-0.0000i    +1.0000+0.0000i    -1.4457-0.5131i 
   +0.0000+0.0000i    +0.0000+0.0000i    +0.0000+0.0000i 

   -2.1035+1.6659i    +1.4706+0.8824i 
   -2.2966-1.1146i    -0.0562+0.9101i 
   -9.0000+3.0000i    +9.0000-3.0000i 

 Press return to continue.