Mathc matrices/03s
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
#define RCA RC3
#define EVALUE RC3
/* ------------------------------------ */
/* ------------------------------------ */
void fun(void)
{
double s = 100.;
double a[RCA*RCA] ={
+1.345288030, +1.760536858, -1.232763852,
+1.760536858, +4.139646496, +0.479295438,
-1.232763852, +0.479295438, +3.515065475
};
double **A = ca_A_mR(a, i_mR(RCA,RCA));
double **V = eigs_V_mR(A, i_mR(RCA,RCA));
double **V3 = c_c_mR(V,EVALUE, i_mR(RCA, C1),C1);
double **sV3 = smul_mR(s,V3, i_mR(RCA, C1));
double **AsV3 = mul_mR(A,sV3, i_mR(RCA, C1));
clrscrn();
printf(" A :");
p_mR(A, S8,P5, C4);
printf(" V :");
p_mR(V, S9,P5, C4);
stop();
clrscrn();
printf(" V%d :",EVALUE);
p_mR(V3, S8,P5, C4);
printf(" %+.0f V%d :",s,EVALUE);
p_mR(sV3, S8,P5, C4);
printf(" A * %+.0f V%d :",s,EVALUE);
p_mR(AsV3, S8,P5, C4);
stop();
f_mR(A);
f_mR(V);
f_mR(V3);
f_mR(sV3);
f_mR(AsV3);
}
/* ------------------------------------ */
int main(void)
{
fun();
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Si A v_λ = 0 , étudier A sv_λ = ? (s un scalaire)
Exemple de sortie écran :
A :
+1.34529 +1.76054 -1.23276
+1.76054 +4.13965 +0.47930
-1.23276 +0.47930 +3.51507
V :
+0.45779 -0.27269 +0.84621
+0.88400 +0.24101 -0.40057
-0.09471 +0.93143 +0.35139
Press return to continue.
V3 :
+0.84621
-0.40057
+0.35139
+100 V3 :
+84.62093
-40.05664
+35.13920
A * +100 V3 :
+0.00000
-0.00000
+0.00000
Press return to continue.