Mathc complexes/04g
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.
#define FACTOR_I0 0.
/* ------------------------------------ */
void fun(void)
{
double **A = r_mRZ(i_mZ(RCA,RCA),999.);
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",RCA);
printf(" EigsValue : FACTOR_I = 0");
eigs_mZ(A,EigsValue);
p_mZ(EigsValue, S15,P9, S15,P9, C5);
eyeI_mZ(A,FACTOR_I);
printf(" EigsValue : FACTOR_I = %.2f",FACTOR_I);
eigs_mZ(A,EigsValue);
p_mZ(EigsValue, S15,P9, S15,P9, C5);
stop();
clrscrn();
eyeI_mZ(A,FACTOR_I0);
printf(" Copy A into the next file.\n\n");
printf(" A : FACTOR_I0 = %.2f",FACTOR_I0);
P_mZ(A, S5,P0, S5,P0, C10);
f_mZ(A);
f_mZ(EigsValue);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun();
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Créer un nouvel exemple.
Exemple de sortie écran : Trouvons les valeurs complexes
Copy/Past into the octave windows
a=[
-762,+31,-568;
-839,-695,-999;
-622,-188,+505]
EigenValues = eigs (a,3)
EigsValue : FACTOR_I = 0
-1118.019344282 +0.000000000i
+819.604382437 +0.000000000i
-653.585038155 +0.000000000i
EigsValue : FACTOR_I = 200.00
-1118.019344282 +200.000000000i
+819.604382437 +200.000000000i
-653.585038155 +200.000000000i
Press return to continue.
Copy A into the next file.
A : FACTOR_I0 = 0.00
-762, +0, +31, +0, -568, +0,
-839, +0, -695, +0, -999, +0,
-622, +0, -188, +0, +505, +0
Press return to continue
Press X return to stop