Mathc complexes/013
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 rc)
{
double **A = rupper_mZ(i_mZ(rc,rc),9);
double **invA = i_mZ(rc,rc);
double **AinvA = i_mZ(rc,rc);
clrscrn();
printf(" A : ");
p_mZ(A, S4,P0, S3,P0, C6);
printf(" invA : ");
p_mZ(inv_mZ(A,invA), S4,P3, S3,P3, C6);
printf(" A * invA : ");
p_mZ(mul_mZ(A,invA,AinvA), S4,P3, S3,P3, C6);
f_mZ(A);
f_mZ(invA);
f_mZ(AinvA);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
fun(rp_I(RC3)+RC1);
while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
L'inverse d'une matrice triangulaire supérieur
Exemple de sortie écran :
A :
+4 -6i -4 -2i +4 +3i -2 +7i
+0 +0i -4 -5i -8 -5i +8 +7i
+0 +0i +0 +0i +4 -4i +6 +8i
+0 +0i +0 +0i +0 +0i +9 +2i
invA :
+0.077+0.115i -0.083-0.051i +0.143-0.235i -0.133+0.134i
+0.000+0.000i -0.098+0.122i -0.235-0.113i +0.280+0.189i
+0.000-0.000i -0.000+0.000i +0.125+0.125i -0.015-0.191i
+0.000+0.000i +0.000-0.000i +0.000+0.000i +0.106-0.024i
A * invA :
+1.000-0.000i +0.000-0.000i +0.000+0.000i -0.000-0.000i
+0.000+0.000i +1.000+0.000i -0.000+0.000i -0.000-0.000i
+0.000+0.000i +0.000+0.000i +1.000+0.000i -0.000+0.000i
+0.000+0.000i +0.000+0.000i +0.000+0.000i +1.000+0.000i
Press return to continue
Press X return to stop