Mathc complexes/020
Apparence
Installer et compiler ce fichier dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = rdefinite_negative_mZ( i_mZ(r,r), 99);
double **invA = inv_mZ(A, i_mZ(r,r));
double **EValue = eigs_mZ(invA, i_mZ(r,C1));
clrscrn();
printf(" A = Q D QT: ");
p_mZ(A, S8,P4, S8,P4, C4);
printf(" invA ");
p_mZ(invA, S8,P4, S8,P4, C4);
printf(" InvA : EValue are negatives");
p_mZ(EValue, S8,P4, S8,P4, C4);
f_mZ(A);
f_mZ(invA);
f_mZ(EValue);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R3)+R1);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
La matrice inverse d'une matrice définie négative est définie négative.
Exemple de sortie écran :
A = Q D QT:
-50.1052 +0.0000i +2.5095 -1.2438i -4.6907 +8.1076i -6.5076-12.7698i
+2.5095 +1.2438i -44.5957 +0.0000i +11.3780 +1.2901i +1.2702 +0.6170i
-4.6907 -8.1076i +11.3780 -1.2901i -42.9020 +0.0000i -2.0750+10.9114i
-6.5076+12.7698i +1.2702 -0.6170i -2.0750-10.9114i -34.3971 +0.0000i
invA
-0.0255 -0.0000i +0.0001 -0.0011i +0.0055 -0.0074i +0.0069 +0.0116i
+0.0001 +0.0011i -0.0243 -0.0000i -0.0074 -0.0007i +0.0002 -0.0030i
+0.0055 +0.0074i -0.0074 +0.0007i -0.0309 -0.0000i +0.0033 -0.0133i
+0.0069 -0.0116i +0.0002 +0.0030i +0.0033 +0.0133i -0.0392 -0.0000i
InvA : EValue are negatives
-0.0588 +0.0000i
-0.0270 +0.0000i
-0.0179 -0.0000i
-0.0161 -0.0000i
Press return to continue
Press X return to stop