É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 R4
/* ------------------------------------ */
int main(void)
{
double a[RCA*RCA]={
+9.387051138013, +1.478424899325, +0.973685336456, -0.700350180421, 
+1.478424899325, +9.614194406175, +0.773429774749, -1.033063523876, 
+0.973685336456, +0.773429774749, +10.505111304292, +1.482769644746, 
-0.700350180421, -1.033063523876, +1.482769644746, +10.493643151520    
};

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=[
+9.387051138,+1.478424899,+0.973685336,-0.700350180;
+1.478424899,+9.614194406,+0.773429775,-1.033063524;
+0.973685336,+0.773429775,+10.505111304,+1.482769645;
-0.700350180,-1.033063524,+1.482769645,+10.493643152]

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

 Press return to continue.