Aller au contenu

Mathc matrices/03z

Un livre de Wikilivres.


Étude du code


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


c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
#define   RCA R3
/* ------------------------------------ */
int main(void)
{
double a[RCA*RCA]={
+8.146673651126, +0.924044002095, +1.085385018334, 
+0.924044002095, +13.821477213201, +6.837925615505, 
+1.085385018334, +6.837925615506, +16.031849135673    
};

double **A = ca_A_mR(a,i_mR(RCA,RCA));

  clrscrn();
  printf(" Copy/Past into the octave windows \n\n");
  p_Octave_mR(A,"a",P9);
  printf(" [V, E] = eigs (a,%d) \n\n",RCA);
  stop();

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


Vérifier avec octave


Exemple de sortie écran :
 Copy/Past into the octave windows 

 a=[
+8.146673651,+0.924044002,+1.085385018;
+0.924044002,+13.821477213,+6.837925616;
+1.085385018,+6.837925616,+16.031849136]

 [V, E] = eigs (a,3) 

 Press return to continue.