Mathc matrices/02l
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int rc)
{
double **A = rcentrosymmetric_mR( i_mR(rc,rc),9.);
double **invA = i_mR(rc,rc);
double **AinvA = i_mR(rc,rc);
clrscrn();
printf(" A : ");
p_mR(A,S4,P0,C6);
printf(" invA : ");
p_mR(inv_mR(A,invA),S4,P5,C6);
printf(" A * invA : ");
p_mR(mul_mR(A,invA,AinvA),S4,P5,C6);
f_mR(A);
f_mR(invA);
f_mR(AinvA);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
fun(rp_I(RC2)*RC2 + RC1);
while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
L'inverse d'une matrice centrosymétrique est une matrice centrosymétrique.
Exemple de sortie écran :
A :
+9 +7 +6 -8 -2
-9 +6 -9 -5 -1
+2 +5 -8 +5 +2
-1 -5 -9 +6 -9
-2 -8 +6 +7 +9
invA :
+0.64403 +0.36282 +0.04545 +0.42506 +0.59839
-0.86219 -0.58324 +0.04545 -0.62888 -0.89539
-0.78788 -0.56061 -0.04545 -0.56061 -0.78788
-0.89539 -0.62888 +0.04545 -0.58324 -0.86219
+0.59839 +0.42506 +0.04545 +0.36282 +0.64403
A * invA :
+1.00000 -0.00000 +0.00000 +0.00000 -0.00000
+0.00000 +1.00000 -0.00000 +0.00000 +0.00000
+0.00000 +0.00000 +1.00000 +0.00000 +0.00000
+0.00000 +0.00000 +0.00000 +1.00000 -0.00000
-0.00000 +0.00000 +0.00000 -0.00000 +1.00000
Press return to continue
Press X return to stop