Mathc complexes/02j
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-1
#define RCA RC3
/* ------------------------------------ */
/* ------------------------------------ */
void fun(void)
{ Do not compile this file :
double a[RCA*(RCA*C2)] ={
+1.344121661,+0.000000000, -0.056736206,-0.111717684, -0.178397348,+0.422109573,
-0.056736206,+0.111717684, +1.045622928,+0.000000000, -0.107623318,-0.127510236,
-0.178397348,-0.422109573, -0.107623318,+0.127510236, +1.610255410,+0.000000000};
double v[RCA*(RCA*C2)] ={
// This is the copy of V2 of the last file
-nan, -nan, +0.154922408,+0.305053400, +0.311295176,-0.736561811,
-nan, -nan, +0.939649653,+0.000000000, +0.000000000,+0.000000000,
-nan, -nan, +0.000000000,+0.000000000, +0.600476487,+0.000000000
};
double **A = ca_A_mZ(a, i_mZ(RCA,RCA));
double **V = ca_A_mZ(v, i_mZ(RCA,RCA));
double **invV = invgj_mZ(V, i_mZ(RCA,RCA));
double **T = i_mZ(RCA,RCA);
double **EigsValue = i_mZ(RCA,RCA);
clrscrn();
printf(" A :");
p_mZ(A, S8,P4, S6,P4, C4);
printf(" V :");
p_mZ(V, S8,P4, S6,P4, C4);
printf(" invV :");
p_mZ(invV, S8,P4, S6,P4, C4);
stop();
clrscrn();
printf(" EigsValue : invV * A * V");
mul_mZ(invV,A,T);
mul_mZ(T,V,EigsValue);
p_mZ(clean_eyes_mZ(EigsValue), S8,P2, S6,P2, C4);
printf(" A :");
p_mZ(A, S8,P4, S6,P4, C4);
printf(" A = V * EigsValue * invV");
mul_mZ(V,EigsValue,T);
mul_mZ(T,invV,A);
p_mZ(A, S8,P4, S6,P4, C4);
stop();
f_mZ(A);
f_mZ(V);
f_mZ(invV);
f_mZ(T);
f_mZ(EigsValue);
}
/* ------------------------------------ */
int main(void)
{
fun();
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Sauver les vecteurs propres des deux valeurs propres identiques
Exemple de sortie écran :
Do not compile this file :