Mathc matrices/h10i
Aller à la navigation
Aller à la recherche
Installer et compiler ces fichiers dans votre répertoire de travail.
![]() |
e03.c |
---|
/* ------------------------------------ */
/* Save as : e03.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
int main(void)
{
double ab[R4*C7]={
+1, 1, 1, 1, 1, 1, 0,
0, 0, 0, 2, 2, 2, 0,
0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0,
};
double **Ab = ca_A_mR(ab,i_Abr_Ac_bc_mR(R4,C6,C1));
double **A = c_Ab_A_mR(Ab,i_mR(R4,C6));
double **b = c_Ab_b_mR(Ab,i_mR(R4,C1));
double **Ab_free = i_Abr_Ac_bc_mR(csize_A_R(Ab),csize_A_R(Ab),C1+C4);
double **b_free = i_mR(rsize_R(Ab_free),csize_b_R(Ab_free));
clrscrn();
printf(" A :");
p_mR(A,S3,P0,C7);
printf(" b :");
p_mR(b,S3,P0,C7);
printf(" Ab :");
p_mR(Ab,S3,P0,C7);
stop();
clrscrn();
put_var_mR(Ab,Ab_free);
printf(" Ab_free : ");
p_mR(Ab_free,S3,P0,C11);
stop();
clrscrn();
put_freeV_mR(Ab_free);
printf(" Ab_free : put_freeV_mR(Ab_free);");
p_mR(Ab_free,S3,P0,C11);
stop();
clrscrn();
c_Ab_b_mR(Ab_free,b_free);
printf(" b_free :");
p_mR(b_free,S3,P0,C7);
printf(" b_free : free variables");
p_freeV(b_free,S3,P0);
stop();
f_mR(Ab);
f_mR(Ab_free);
f_mR(b);
f_mR(b_free);
f_mR(A);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
------------------------------------
A :
+1 +1 +1 +1 +1 +1
+0 +0 +0 +2 +2 +2
+0 +0 +0 +0 +0 +0
+0 +0 +0 +0 +0 +0
b :
+0
+0
+0
+0
Ab :
+1 +1 +1 +1 +1 +1 +0
+0 +0 +0 +2 +2 +2 +0
+0 +0 +0 +0 +0 +0 +0
+0 +0 +0 +0 +0 +0 +0
Press return to continue.
Ab_free :
+1 +1 +1 +1 +1 +1 +0 +0 +0 +0 +0
+0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0
+0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0
+0 +0 +0 +2 +2 +2 +0 +0 +0 +0 +0
+0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0
+0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0
Press return to continue.
Ab_free : put_freeV_mR(Ab_free);
+1 +1 +1 +1 +1 +1 +0 +0 +0 +0 +0
+0 +1 +0 +0 +0 +0 +0 +1 +0 +0 +0
+0 +0 +1 +0 +0 +0 +0 +0 +1 +0 +0
+0 +0 +0 +2 +2 +2 +0 +0 +0 +0 +0
+0 +0 +0 +0 +1 +0 +0 +0 +0 +1 +0
+0 +0 +0 +0 +0 +1 +0 +0 +0 +0 +1
Press return to continue.
b_free :
+0 +0 +0 +0 +0
+0 +1 +0 +0 +0
+0 +0 +1 +0 +0
+0 +0 +0 +0 +0
+0 +0 +0 +1 +0
+0 +0 +0 +0 +1
b_free : free variables
x1 = +0 +0*s +0*t +0*u +0*v
x2 = +0 +1*s +0*t +0*u +0*v
x3 = +0 +0*s +1*t +0*u +0*v
x4 = +0 +0*s +0*t +0*u +0*v
x5 = +0 +0*s +0*t +1*u +0*v
x6 = +0 +0*s +0*t +0*u +1*v
Press return to continue.