Mathc matrices/01h
Apparence
Valeurs propres. Vecteurs propres
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
#define RCA R2
/* ------------------------------------ */
int main(void)
{
double a[RCA*RCA]={
- 4, +5,
+5, +3
};
double **A = ca_A_mR(a,i_mR(RCA,RCA));
double **EigsVector = i_mR(RCA,RCA);
double **T_EigsVector = i_mR(RCA,RCA);
double **EigsValue = i_mR(RCA,RCA);
double **T1 = i_mR(RCA,RCA);
clrscrn();
printf(" Copy/Past into the octave windows \n\n");
p_Octave_mR(A,"a",P0);
printf(" [V, E] = eigs (a,%d) \n\n",RCA);
stop();
clrscrn();
printf(" EigsVector:");
eigs_V_mR(A,EigsVector);
p_mR(EigsVector,S10,P4,C6);
printf(" EigsValue : T_EigsVector * A * EigsVector");
transpose_mR(EigsVector,T_EigsVector);
mul_mR(T_EigsVector,A,T1);
mul_mR(T1,EigsVector,EigsValue);
p_mR(EigsValue,S10,P4,C6);
printf(" T_EigsVector * EigsVector = IDE");
mul_mR(T_EigsVector,EigsVector,T1);
p_mR(T1,S10,P4,C6);
stop();
f_mR(A);
f_mR(EigsVector);
f_mR(T_EigsVector);
f_mR(EigsValue);
f_mR(T1);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
Copy/Past into the octave windows
a=[
-4,+5;
+5,+3]
[V, E] = eigs (a,2)
Press return to continue.
EigsVector:
+0.8870 +0.4618
-0.4618 +0.8870
EigsValue : T_EigsVector * A * EigsVector
-6.6033 +0.0000
+0.0000 +5.6033
T_EigsVector * EigsVector = IDE
+1.0000 +0.0000
+0.0000 +1.0000
Press return to continue.