Mathc matrices/c11cn
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 RC5
/* ------------------------------------ */
/* ------------------------------------ */
void fun(void)
{
double **A = rsymmetric_mR(i_mR(RCA,RCA),999.);
double **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(" A :");
p_mR(A,S10,P2,C6);
eigs_V_mR(A,EigsVector);
transpose_mR(EigsVector,T_EigsVector);
/* EigsValue = T_EigsVector * A * EigsVector */
mul_mR(T_EigsVector,A,T1);
mul_mR(T1,EigsVector,EigsValue);
mul_mR(EigsVector,EigsValue,T1);
mul_mR(T1,T_EigsVector,a);
printf(" A : EigsVector * EigsValue * T_EigsVector");
p_mR(a,S10,P2,C6);
f_mR(A);
f_mR(a);
f_mR(EigsVector);
f_mR(T_EigsVector);
f_mR(EigsValue);
f_mR(T1);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun();
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
A = V * EValue * T_V Exemple de sortie écran :
/* ------------------------------------ */
A :
+806.0000 -447.0000 -207.0000 +644.0000
-447.0000 -539.0000 +192.0000 -311.0000
-207.0000 +192.0000 -949.0000 -523.0000
+644.0000 -311.0000 -523.0000 +986.0000
A : EigsVector * EigsValue * T_EigsVector
+806.0000 -447.0000 -207.0000 +644.0000
-447.0000 -539.0000 +192.0000 -311.0000
-207.0000 +192.0000 -949.0000 -523.0000
+644.0000 -311.0000 -523.0000 +986.0000
Press return to continue
Press X to stop