Mathc matrices/a144
Quelques propriétés des valeurs propres.
Installer et compiler ces fichiers dans votre répertoire de travail.
c05b.c |
---|
/* ------------------------------------ */
/* Save as : c05b.c */
/* */
/* New function into the file "vism.h" */
/* */
/* m1_mR(double **One); */
/* */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
#define RCA R3
/* ------------------------------------ */
int main(void)
{
double a[RCA*RCA]={
+966,+98,+864,
+98,+692,+214,
+864,+214,+376
};
double s = rp_I(9);
double **A = ca_A_mR(a, i_mR(RCA,RCA));
double **EigsValueA = eigs_mR(A, i_mR(RCA,C1) );
double **ID = eye_mR( i_mR(RCA,RCA));
double **sID = smul_mR(s, ID,i_mR(RCA,RCA));
double **Apls_sID = add_mR(A, sID,i_mR(RCA,RCA));
double **EigsValueApls_sID = eigs_mR(Apls_sID,i_mR(RCA,C1));
double **M = m1_mR( i_mR(RCA,C1));
double **sM = smul_mR(s,M, i_mR(RCA,C1));
clrscrn();
printf(" A :");
p_mR(A,S3,P0,C6);
printf(" EigsValue A :");
p_mR(EigsValueA,S13,P6,C1);
printf(" A + %.0f*ID :",s);
p_mR(Apls_sID,S4,P0,C6);
printf(" EigsValue A + %.0f*ID :",s);
p_mR(EigsValueApls_sID,S13,P6,C1);
stop();
clrscrn();
printf(" EigsValue A :");
p_mR(EigsValueA,S13,P6,C1);
printf(" EigsValue A + %.0f*ID :",s);
p_mR(EigsValueApls_sID,S13,P6,C1);
printf(" EigsValue A + %.0f :",s);
add_mR(EigsValueA,sM,M);
p_mR(M,S13,P6,C1);
stop();
f_mR(A);
f_mR(EigsValueA);
f_mR(ID);
f_mR(sID);
f_mR(Apls_sID);
f_mR(EigsValueApls_sID);
f_mR(M);
f_mR(sM);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Les valeurs propres de A+sID correspondent aux valeurs propres de A plus s :
Attention : On ajoute s qu'aux valeurs sur la diagonal. Exemple de sortie écran :
A :
+966 +98 +864
+98 +692 +214
+864 +214 +376
EigsValue A :
+1628.835762
+661.931131
-256.766893
A + 2*ID :
+968 +98 +864
+98 +694 +214
+864 +214 +378
EigsValue A + 2*ID :
+1630.835762
+663.931131
-254.766893
Press return to continue.
EigsValue A :
+1628.835762
+661.931131
-256.766893
EigsValue A + 2*ID :
+1630.835762
+663.931131
-254.766893
EigsValue A + 2 :
+1630.835762
+663.931131
-254.766893
Press return to continue.