Mathc matrices/03x
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
#define RCA RC4
#define EVALUE RC4
/* ------------------------------------ */
/* ------------------------------------ */
void fun(void)
{
double s = 100.;
double a[RCA*RCA] ={
+3.267287828, -0.475271661, -0.227635307, +0.991405738,
-0.475271661, +3.181920907, -1.871467453, -1.222576216,
-0.227635307, -1.871467453, +2.581540251, -0.755834393,
+0.991405738, -1.222576216, -0.755834393, +1.969251014
};
double **A = ca_A_mR(a, i_mR(RCA,RCA));
double **V = eigs_V_mR(A, i_mR(RCA,RCA));
double **V4 = c_c_mR(V,EVALUE, i_mR(RCA, C1),C1);
double **sV4 = smul_mR(s,V4, i_mR(RCA, C1));
double **AsV4 = mul_mR(A,sV4, 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(V4, S8,P5, C4);
printf(" %+.0f V%d :",s,EVALUE);
p_mR(sV4, S8,P5, C4);
printf(" A * %+.0f V%d :",s,EVALUE);
p_mR(AsV4, S8,P5, C4);
stop();
f_mR(A);
f_mR(V);
f_mR(V4);
f_mR(sV4);
f_mR(AsV4);
}
/* ------------------------------------ */
int main(void)
{
fun();
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Si A v_λ = 0 , étudier A sv_λ = ? (s un scalaire)
Exemple de sortie écran :
A :
+3.26729 -0.47527 -0.22764 +0.99141
-0.47527 +3.18192 -1.87147 -1.22258
-0.22764 -1.87147 +2.58154 -0.75583
+0.99141 -1.22258 -0.75583 +1.96925
V :
-0.31795 +0.69685 +0.64009 -0.05995
+0.76747 +0.13627 +0.28512 +0.55779
-0.47145 -0.53535 +0.40238 +0.57378
-0.29602 +0.45742 -0.58914 +0.59670
Press return to continue.
V4 :
-0.05995
+0.55779
+0.57378
+0.59670
+100 V4 :
-5.99452
+55.77883
+57.37830
+59.67008
A * +100 V4 :
+0.00000
-0.00000
-0.00000
-0.00000
Press return to continue.