Aller au contenu

Mathc matrices/00y

Un livre de Wikilivres.


Matrice de Hankel

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

c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **U  = r_mR(          i_mR(R1,r),9);
double **V  = r_mR(          i_mR(r,C1),9);	
double **A  = rHankel_mR(U,V,i_mR(r,r)   ); 

double **b  = r_mR(          i_mR(r,C3),9);

double **Ab = i_Abr_Ac_bc_mR(   r,   r,  C3);
/*            i_Abr_Ac_bc_mR(R_Ab, C_A, C_b);  */

  clrscrn();
  printf(" A :");
  p_mR(A,S4,P0,C8);
  
  printf(" b :");
  p_mR(b,S4,P0,C8);
  
  printf(" Ab :");
  c_A_b_Ab_mR(A,b,Ab);
  p_mR(Ab,S4,P0,C8);
  stop();

  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_TP_mR(Ab) :");
  gj_TP_mR(Ab);
  p_mR(Ab,S8,P3,C8);

  f_mR(Ab);
  
  f_mR(b);
  
  f_mR(U);
  f_mR(V); 
  f_mR(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));
do
{
  fun(rp_I(RC4)+R1);


} while(stop_w());

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


Matrice de Hankel.

Exemple de sortie écran :

 A :
  -5   -9   +8   +5   +5 
  -9   +8   +5   +5   -1 
  +8   +5   +5   -1   -7 
  +5   +5   -1   -7   +7 
  +5   -1   -7   +7   -9 

 b :
  -8   +2   +4 
  +7   +9   -8 
  -8   +3   +8 
  -9   -5   +5 
  -5   -9   -1 

 Ab :
  -5   -9   +8   +5   +5   -8   +2   +4 
  -9   +8   +5   +5   -1   +7   +9   -8 
  +8   +5   +5   -1   -7   -8   +3   +8 
  +5   +5   -1   -7   +7   -9   -5   +5 
  +5   -1   -7   +7   -9   -5   -9   -1 

 Press return to continue. 


 Copy/Past into the octave window.

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


 rref(Ab,.00000000001)

  gj_TP_mR(Ab) :
  +1.000   +0.000   +0.000   -0.000   +0.000   -2.032   -0.965   +1.057 
  +0.000   +1.000   +0.000   -0.000   +0.000   -0.204   +0.023   -0.231 
  +0.000   +0.000   +1.000   +0.000   +0.000   -0.527   +0.765   +0.623 
  +0.000   +0.000   +0.000   +1.000   +0.000   -1.696   -0.908   +0.115 
  +0.000   +0.000   +0.000   -0.000   +1.000   -1.460   -0.840   +0.328 


 Press   return to continue
 Press X return to stop