Mathc complexes/04l
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define RCA RC4
#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=[
-683,-804,-420,+296;
-608,-204,+101,-391;
+888,+711,+338,+857;
+358,-63,+765,-822]
EigenValues = eigs (a,4)
EigsValue : FACTOR_I = 0
-1199.783273856 +0.000000000i
-1152.407938509 +0.000000000i
+551.229907833 +0.000000000i
+429.961304531 +0.000000000i
EigsValue : FACTOR_I = 200.00
-1176.095605735 +268.234465501i
-1176.095606629 +131.765534499i
+551.229907833 +200.000000000i
+429.961304531 +200.000000000i
Press return to continue.
Copy A into the next file.
A : FACTOR_I0 = 0.00
-683, +0, -804, +0, -420, +0, +296, +0,
-608, +0, -204, +0, +101, +0, -391, +0,
+888, +0, +711, +0, +338, +0, +857, +0,
+358, +0, -63, +0, +765, +0, -822, +0
Press return to continue
Press X return to stop