Mathc matrices/015
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
#define FACTOR_E +1.E-0
/* ------------------------------------ */
void fun(int r)
{
double **U = r_mR( i_mR(R1, r),9);
double **V = r_mR( i_mR(r ,C1),9);
double **A = rToeplitz_mR(U,V,i_mR(r , r) );
double **Adjoint = i_mR(r,r);
double **Cofactor = i_mR(r,r);
clrscrn();
printf(" A :");
p_mR(A,S3,P0,C6);
printf(" Cofactor :\n");
p_mR(cofactor_mR(A,Cofactor),S6,P0,C6);
printf(" Adjoint : Cofactor**T");
p_mR(adjoint_mR(A,Adjoint),S6,P0,C6);
f_mR(U);
f_mR(V);
f_mR(A);
f_mR(Cofactor);
f_mR(Adjoint);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R4)+R1);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Matrice de Toeplitz.
Exemple de sortie écran :
A :
-8 -4 -9 -3
+7 -8 -4 -9
+5 +7 -8 -4
+9 +5 +7 -8
Cofactor :
-1681 +335 +58 -1631
+959 -1093 -386 +58
+709 +790 -1093 +335
-803 +709 +959 -1681
Adjoint : Cofactor**T
-1681 +959 +709 -803
+335 -1093 +790 +709
+58 -386 -1093 +959
-1631 +58 +335 -1681
Press return to continue
Press X return to stop