Mathc matrices/03z
Apparence
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));
double **EValue = eigs_mR(A, i_mR(RCA,R1));
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);
printf(" EValue");
p_mR(EValue,S10,P3,C10);
stop();
f_mR(A);
f_mR(EValue);
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)
EValue
+22.000
+8.000
+8.000
Press return to continue.