Mathc complexes/04h
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define RCA RC3
#define FACTOR_I 200.
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
{
double a[RCA*(RCA*C2)] ={
+799, +0, +211, +0, +972, +0,
-791, +0, -775, +0, +886, +0,
+258, +0, -748, +0, +845, +0 };
double **A = ca_A_mZ(a, i_mZ(RCA,RCA));
double **EigsValue = i_mZ(RCA,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",RCA);
eyeI_mZ(A,FACTOR_I);
printf(" EigsValue : FACTOR_I = %.2f",FACTOR_I);
eigs_mZ(A,EigsValue);
p_mZ(EigsValue, 20,P12, 20,P12, C5);
printf(" Look at the end of the C file.\n\n\n");
stop();
f_mZ(A);
f_mZ(EigsValue);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
/*
EigsValue : FACTOR_I = 200.00
+1385.904981693673 +200.000000000001i
-258.452490846828 +993.405003240218i
-258.452490846828 -593.405003240218i
* 200 = 0 ?
* (993.405003240218+593.405003240218)/2 = 793.405003240218
Copy A and these values into the next file.
double eigsvalue[RCA*C2] ={
-258.452490846828, +793.405003240218,
-258.452490846828, -793.405003240218,
+1385.904981693673, +0};
*/
Le tester.
Exemple de sortie écran : Trouvons les valeurs complexes
Copy/Past into the octave windows
a=[
+799,+211,+972;
-791,-775,+886;
+258,-748,+845]
EigenValues = eigs (a,3)
EigsValue : FACTOR_I = 200.00
+1385.904981693673 +200.000000000001i
-258.452490846828 +993.405003240218i
-258.452490846828 -593.405003240218i
Look at the end of the C file.
Press return to continue.