Aller au contenu

Mathc complexes/a195

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   RCA RC4
#define   Cb C1
/* ------------------------------------ */
int main(void)
{
double ta[RCA*(RCA*C2)] ={  
 -826,+623,  +985,-271,  +849,-954,  -671,-220, 
 -826,+623,  +985,-271,  +849,-954,  -671,-220, 
 -826,+623,  +985,-271,  +849,-954,  -671,-220, 
 +489, -44,  -740,+892,  -908,-267,  -734,+284 };

double tb[RCA*(Cb*C2)] ={  
 +566,+183, 
 +566,+183, 
 +566,+183, 
 +866,-619    }; 

double **A = ca_A_mZ(ta, i_mZ(RCA,RCA));                        
double **b = ca_A_mZ(tb, i_mZ(RCA,Cb)); 

double **Ab =            i_Abr_Ac_bc_mZ(RCA,RCA,Cb); 

  c_A_b_Ab_mZ(A,b,Ab);  
  	
  clrscrn();
  printf(" A :");
  P_mZ(A, S5,P0, S4,P0, C6);
  printf(" b :");
  P_mZ(b, S5,P0, S4,P0, C6);
  stop();

  clrscrn();
  printf(" Copy/Past into the octave window.\n\n");
  p_Octave_mZ(Ab,"Ab",P0, P0);
  printf(" rref(Ab,.00000000001)\n\n");
  
  printf(" gj_mZ(Ab) :");
  p_mZ(gj_mZ(Ab),S9,P4,S9,P4,C4);

  f_mZ(Ab);
  f_mZ(b);
  f_mZ(A);

  stop();

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


Exemple de sortie écran :
 ------------------------------------ 
 A :
 -826,+623,  +985,-271,  +849,-954,  -671,-220, 
 -826,+623,  +985,-271,  +849,-954,  -671,-220, 
 -826,+623,  +985,-271,  +849,-954,  -671,-220, 
 +489, -44,  -740,+892,  -908,-267,  -734,+284  

 b :
 +566,+183, 
 +566,+183, 
 +566,+183, 
 +866,-619  

 Press return to continue. 


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

 Ab=[
-826+623*i,+985-271*i,+849-954*i,-671-220*i,+566+183*i;
-826+623*i,+985-271*i,+849-954*i,-671-220*i,+566+183*i;
-826+623*i,+985-271*i,+849-954*i,-671-220*i,+566+183*i;
+489-44*i,-740+892*i,-908-267*i,-734+284*i,+866-619*i]

 rref(Ab,.00000000001)

 gj4_mZ(Ab) :
  +1.0000  -0.0000i   +0.0000  -0.0000i   -1.6492  +0.4954i   +0.3124  +1.4367i 
  -0.0000  -0.0000i   +1.0000  -0.0000i   -0.3184  +0.4024i   +0.2545  +0.8538i 
  +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.0000  +0.0000i   +0.0000  +0.0000i 

  -0.5885  -1.4786i 
  -0.6195  -0.8524i 
  +0.0000  +0.0000i 
  +0.0000  +0.0000i 

 Press return to continue.