Mathc complexes/a306
Apparence
Quelques propriétés des valeurs propres. Matrices non symétrique conjuguée
Installer et compiler ces fichiers dans votre répertoire de travail.
c03a.c |
---|
/* ------------------------------------ */
/* Save as : c03a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = i_mZ(r,r );
double **EigsValue = i_mZ(r,C1);
double **Inv = i_mZ(r,r );
double **EigsValueInv = i_mZ(r,C1);
int i = 0;
int j = 0;
nb_Z z1 = i_Z(0,0);
nb_Z z2 = i_Z(0,0);
do{
r_mZ(A,9);
printf(".");
}while(!det_Z(A).r||!det_Z(A).i);
eigs_mZ(A,EigsValue);
inv_mZ(A,Inv);
eigs_mZ(Inv,EigsValueInv);
clrscrn();
printf(" A :");
p_mZ(A,S5,P0,S4,P0,C6);
printf(" EigsValue of A :");
p_mZ(EigsValue,S9,P3,S8,P3,C6);
printf(" inv(A)");
pE_mZ(Inv,S7,P2,S6,P2,C6);
printf(" EigsValue of invA :");
pE_mZ(EigsValueInv,S11,P3,S11,P3,C6);
stop();
clrscrn();
for(i=R1,j=r; i<=r; i++,j--)
{
z1 = i_Z(EigsValue [i][C1], EigsValue [i][C2]);
z2 = i_Z(EigsValueInv[j][C1], EigsValueInv[j][C2]);
printf(" EigsValue*EigsValueInv :");
p_Z(mul_Z(z1,z2),S8,P3,S7,P3);printf("\n");
}
f_mZ(EigsValueInv);
f_mZ(EigsValue);
f_mZ(Inv);
f_mZ(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(RC2)+RC2);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Les valeurs propres de l'inverse de A correspondent aux inverses des valeurs propres de A :
Exemple de sortie écran :
A :
+7 +1i +2 +9i -5 +8i
-3 +9i +5 -1i -3 +3i
-8 -9i +8 -8i +3 -9i
EigsValue of A :
+10.248 -9.793i
+9.779 +6.710i
-5.028 -5.917i
inv(A)
+4.42e-02+5.90e-02i -1.04e-02-8.67e-02i +4.21e-02+3.06e-02i
+3.76e-02+1.93e-02i +6.82e-02-1.68e-02i +6.25e-02+3.44e-02i
-1.23e-01-2.94e-02i +2.03e-02+2.50e-02i -7.52e-02+5.70e-02i
EigsValue of invA :
-8.340e-02 +9.815e-02i
+6.953e-02 -4.770e-02i
+5.100e-02 +4.874e-02i
Press return to continue.
EigsValue*EigsValueInv : +1.000 +0.000i
EigsValue*EigsValueInv : +1.000 +0.000i
EigsValue*EigsValueInv : +1.000 -0.000i
Press return to continue
Press X return to stop