Mathc matrices/a143
Apparence
Quelques propriétés des valeurs propres.
Installer et compiler ces fichiers dans votre répertoire de travail.
c05a.c |
---|
/* ------------------------------------ */
/* Save as : c05a.c */
/* */
/* New function into the file "vism.h" */
/* */
/* m1_mR(double **One); */
/* */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double s = rp_I(9);
double **A = rsymmetric_mR( i_mR(r, r),99.);
double **EigsValueA = eigs_mR(A, i_mR(r,C1) );
double **ID = eye_mR( i_mR(r, r));
double **sID = smul_mR(s, ID,i_mR(r, r));
double **Apls_sID = add_mR(A, sID,i_mR(r, r));
double **EigsValueApls_sID = eigs_mR(Apls_sID,i_mR(r,C1));
double **M = m1_mR( i_mR(r,C1));
double **sM = smul_mR(s,M, i_mR(r,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);
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);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R4)+R2);
} while(stop_w());
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 :
+84 -7 +78 -18 +53
-7 -8 +88 +23 -77
+78 +88 -64 +50 -67
-18 +23 +50 -62 +26
+53 -77 -67 +26 -81
EigsValue A :
-196.917425
+128.165723
-124.869294
+105.912910
-43.291913
A + 7*ID :
+91 -7 +78 -18 +53
-7 -1 +88 +23 -77
+78 +88 -57 +50 -67
-18 +23 +50 -55 +26
+53 -77 -67 +26 -74
EigsValue A + 7*ID :
-189.917425
+135.165723
-117.869294
+112.912910
-36.291913
Press return to continue.
EigsValue A :
-196.917425
+128.165723
-124.869294
+105.912910
-43.291913
EigsValue A + 7*ID :
-189.917425
+135.165723
-117.869294
+112.912910
-36.291913
EigsValue A + 7 :
-189.917425
+135.165723
-117.869294
+112.912910
-36.291913
Press return to continue
Press X return to stop