Mathc complexes/a67
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define FACTOR_E +1.E-2
#define RCA RC3
/* ------------------------------------ */
/* ------------------------------------ */
void fun(void)
{
double **A = rcsymmetric_mZ(i_mZ(RCA,RCA),99);
double **V = i_mZ(RCA,RCA);
double **EigsValue = i_mZ(RCA,C1);
clrscrn();
printf(" Copy/Past into the octave windows \n\n");
p_Octave_mZ(A,"a",P0,P0);
printf(" format short e\n"
" [V, E] = eigs (a,%d)\n\n", RCA);
eigs_V_mZ(A,V,FACTOR_E);
printf(" V :");
pE_mZ(V, S12,P4, S12,P4, C4);
eigs_mZ(A,EigsValue);
printf(" EigsValue :");
p_mZ(EigsValue, S12,P4, S12,P4, C4);
f_mZ(A);
f_mZ(V);
f_mZ(EigsValue);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun();
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
Copy/Past into the octave windows
a=[
+26191+0*i,-3444+9191*i,+18535-3803*i;
-3444-9191*i,+27183+0*i,-3591-9206*i;
+18535+3803*i,-3591+9206*i,+29984+0*i]
format short e
[V, E] = eigs (a,3)
V :
+5.9277e-01 -1.0319e-01i +2.1876e-01 -1.7279e-01i -7.2039e-01 +2.0324e-01i
-1.9768e-01 -4.1161e-01i +5.3229e-01 +7.0439e-01i -1.0948e-01 +5.4531e-03i
+6.5535e-01 +0.0000e+00i +3.7789e-01 +3.0722e-17i +6.5400e-01 +0.0000e+00i
EigsValue :
+54213.2381 -0.0000i
+20234.5893 +0.0000i
+8910.1726 -0.0000i
Press return to continue
Press X return to stop