Mathc complexes/04f
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define RC RC5
#define FACTOR_I 1. //100
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
{
double a[RC*(RC*C2)] ={
+766, +0, +833, +0, -382, +0, +491, +0, +386, +0,
+880, +0, +623, +0, +996, +0, -176, +0, +290, +0,
+354, +0, +932, +0, -917, +0, +62, +0, +648, +0,
-715, +0, +342, +0, -59, +0, +279, +0, -16, +0,
+73, +0, +819, +0, +618, +0, +772, +0, -636, +0 };
double **A = ca_A_mZ(a, i_mZ(RC,RC));
double **EigsValue = i_mZ(RC,C1);
clrscrn();
printf(" Copy/Past into the octave windows \n\n");
p_Octave_mRZ(A,"a",P0);
/* printf("format short e;\n"); */
printf(" EigenValues = eigs (a,%d)\n\n\n",RC);
eyeI_mZ(A,FACTOR_I);
printf(" EigsValue : FACTOR_I = %.2f",FACTOR_I);
eigs_mZ(A,EigsValue);
p_mZ(EigsValue, 20,P9, 20,P9, C5);
f_mZ(A);
f_mZ(EigsValue);
stop();
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran : Trouvons les valeurs complexes
Copy/Past into the octave windows
a=[
+766+0*i,+833+0*i,-382+0*i,+491+0*i,+386+0*i;
+880+0*i,+623+0*i,+996+0*i,-176+0*i,+290+0*i;
+354+0*i,+932+0*i,-917+0*i,+62+0*i,+648+0*i;
-715+0*i,+342+0*i,-59+0*i,+279+0*i,-16+0*i;
+73+0*i,+819+0*i,+618+0*i,+772+0*i,-636+0*i]
EigenValues = eigs (a,5)
EigsValue : FACTOR_I = 1.00
+1878.641708752 +1.000000000i
-1556.160005281 +1.000000000i
-587.551059389 +1.000000000i
+189.632571090 +511.427546570i
+190.436784828 -509.427546570i
Press return to continue.