Mathc complexes/09e
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
|---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define FACTOR_E +1.E-3
/* ------------------------------------ */
#define RCA RC2
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
{
double a[RCA*RCA] ={
+0.719101123596, +0.449438202247,
+0.449438202247, +0.280898876404
};
double **A = ca_A_mRZ(a, i_mZ(RCA,RCA));
double **V = eigs_V_mZ(A, i_mZ(RCA,RCA),FACTOR_E);
double **invV = invgj_mZ(V, i_mZ(RCA,RCA));
double **EValue = i_mZ(RCA,RCA);
double **T = i_mZ(RCA,RCA);
clrscrn();
printf(" A :");
p_mRZ(A, S8,P6, C3);
printf(" V :");
p_mRZ(V, S9,P6, C4);
printf(" EValue = invV * A * V");
mul_mZ(invV,A,T);
mul_mZ(T,V,EValue);
p_mRZ(EValue, S9,P6, C4);
printf(" A = V * EValue * invV");
mul_mZ(V,EValue,T);
mul_mZ(T,invV,A);
p_mRZ(A, S8,P6, C3);
stop();
clrscrn();
printf(" The matrix A projects the plane in the direction\n"
" of the eigenvector V2 on a line determined by\n"
" the eigenvector V1 if :\n\n"
" The eigenvector V1 has its eigenvalue equal to one and\n"
" The eigenvector V2 has its eigenvalue equal to zero and\n\n"
" If The vectors V1 and V2 are linearly independent\n\n");
printf(" det(V) = ");p_Z(det_Z(V), S4,P5, S5,P5);printf("\n");
stop();
f_mZ(A);
f_mZ(V);
f_mZ(invV);
f_mZ(T);
f_mZ(EValue);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Projection du plan sur une droite.
Exemple de sortie écran :
A :
+0.719101 +0.449438
+0.449438 +0.280899
V :
+0.847998 -0.529999
+0.529999 +0.847998
EValue = invV * A * V
+1.000000 +0.000000
+0.000000 -0.000000
A = V * EValue * invV
+0.719101 +0.449438
+0.449438 +0.280899
Press return to continue.
The matrix A projects the plane in the direction
of the eigenvector V2 on a line determined by
the eigenvector V1 if :
The eigenvector V1 has its eigenvalue equal to one and
The eigenvector V2 has its eigenvalue equal to zero and
If The vectors V1 and V2 are linearly independent
det(V) = +1.00000+0.00000i
Press return to continue.