Application


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


c00.c
/* ------------------------------------ */
/*  Save as :   c00.c                   */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
/* ------------------------------------ */
#define   RA R4
#define   CA C4
#define   Cb C2
/* ------------------------------------ */
/* ------------------------------------ */
#define   B     (1.)
//#define   B   (-10.)
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
{
/* 
 * Find a value for "B" so that the system is compatible.
*/ 
double ab[RA*(CA+Cb)]={
//           A         =  x*B  +  y 
  -1,   -9,   -8,   +1,   0*B,   +8, 
  -2,   -1,   +4,   +1,   2*B,   +4, 
  +6,   +9,   +3,   -5,   0*B,   +5, 
  -2,   -1,   +4,   +1,   1*B,   -6 };   

double **Ab = ca_A_mR(ab,i_Abr_Ac_bc_mR(RA,CA,Cb));
double **A  = c_Ab_A_mR(Ab,i_mR(RA,CA));
double **b  = c_Ab_b_mR(Ab,i_mR(RA,Cb));

  clrscrn();
  printf(" A :");
  p_mR(A,S3,P0,C7);
  printf(" b :");
  p_mR(b,S3,P0,C7);
  printf(" Ab :");
  p_mR(Ab,S3,P0,C7);
  getchar();

  clrscrn();
  printf(" Copy/Past into the octave window.\n\n");
  p_Octave_mR(Ab,"Ab",P0);
  printf("\n rref(Ab,.00000000001)\n\n");
  printf("  gj_PP_mR(Ab,YES) :");
  gj_PP_mR(Ab,YES);
  p_mR(Ab,S8,P4,C7);
  stop();

  f_mR(Ab);
  f_mR(b);
  f_mR(A);
  
  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */


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


Exemple de sortie écran :
 ------------------------------------ 
 A :
 -1  -9  -8  +1 
 -2  -1  +4  +1 
 +6  +9  +3  -5 
 -2  -1  +4  +1 

 b :
 +0  +8 
 +2  +4 
 +0  +5 
 +1  -6 

 Ab :
 -1  -9  -8  +1  +0  +8 
 -2  -1  +4  +1  +2  +4 
 +6  +9  +3  -5  +0  +5 
 -2  -1  +4  +1  +1  -6 


 ------------------------------------ 
 Copy/Past into the octave window.

 Ab=[
-1,-9,-8,+1,+0,+8;
-2,-1,+4,+1,+2,+4;
+6,+9,+3,-5,+0,+5;
-2,-1,+4,+1,+1,-6]


 rref(Ab,.00000000001)

  gj_PP_mR(Ab,YES) :
 +1.0000  +0.0000  +0.0000  -1.0074  +0.6667  +5.2741 
 -0.0000  +1.0000  +0.0000  +0.1852  -0.6667  -3.8519 
 +0.0000  +0.0000  +1.0000  -0.2074  +0.6667  +2.6741 
 +0.0000  +0.0000  +0.0000  +0.0000  -1.0000 -10.0000 

 Press return to continue.


La dernière ligne donne :

+0.0000  +0.0000  +0.0000  +0.0000  -1.0000 -10.0000 

ou bien

+0.0000  = -1.0000 -10.0000 

en introduisant B 

+0.0000  = -1.0000 B -10.0000 
 
soit le système 

 -1.0000 B = +10.0000  
 
 cela donne
 
 B  =  -10.