Mathc complexes/a291
Quelques propriétés des valeurs propres. Matrices symétriques conjugués
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{
rcsymmetric_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,S7,P2,C6);
printf(" inv(A)");
pE_mZ(Inv,S7,P2,S6,P2,C6);
printf(" EigsValue of invA :");
pE_mZ(erase_i_mZ(EigsValueInv),S11,P3,S10,P2,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),S7,P3,S3,P2);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 :
+480 +0i -245 +35i -117+189i +98 -28i
-245 -35i +181 +0i +94-108i -84 +1i
-117-189i +94+108i +221 +0i -45-109i
+98 +28i -84 -1i -45+109i +200 +0i
EigsValue of A :
+797.677 +0.00i
+189.558 -0.00i
+59.892 +0.00i
+34.873 -0.00i
inv(A)
+7.92e-03-7.26e-19i +9.18e-03-4.10e-04i +1.34e-03-2.80e-03i +1.80e-03+9.94e-04i
+9.18e-03+4.10e-04i +2.28e-02-1.84e-18i -4.35e-03+1.78e-03i +3.06e-03-9.96e-04i
+1.34e-03+2.80e-03i -4.35e-03-1.78e-03i +1.29e-02-1.99e-19i +1.10e-05+5.10e-03i
+1.80e-03-9.94e-04i +3.06e-03+9.96e-04i +1.10e-05-5.10e-03i +8.33e-03-3.68e-20i
EigsValue of invA :
+2.868e-02 +0.00e+00i
+1.670e-02 +0.00e+00i
+5.275e-03 +0.00e+00i
+1.254e-03 +0.00e+00i
Press return to continue.
EigsValue*EigsValueInv : +1.000+0.00i
EigsValue*EigsValueInv : +1.000-0.00i
EigsValue*EigsValueInv : +1.000+0.00i
EigsValue*EigsValueInv : +1.000-0.00i
Press return to continue
Press X return to stop