Mathc matrices/c101b
Installer et compiler ces fichiers dans votre répertoire de travail.
![]() |
gjfree_a.c |
---|
/* ------------------------------------ */
/* Save as : gjfree.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = r_mR(i_mR(r,r+C2),999.);
double **b = r_mR(i_mR(r,C1),999.);
double **Ab = c_A_b_Ab_mR(A,b,i_AbR0_mR(r,r+C2,C1));
/* i_AbR0_mR(R_Ab,C_A,C_b)); */
clrscrn();
printf(" A :");
p_mR(A,5,0,7);
printf(" b :");
p_mR(b,5,0,7);
printf(" Ab :");
p_mR(Ab,5,0,9);
stop();
clrscrn();
gj_freevariable_mR(Ab,5,5);
f_mR(Ab);
f_mR(b);
f_mR(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(3)+1);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Déclaration des fichiers h. Exemple de sortie écran :
------------------------------------
A :
-815 -729 -247 -333 +908 -511
+642 +282 -1 +620 -203 -143
-765 -759 -781 -787 -627 +478
-629 +624 +720 +142 +638 -745
b :
+244
-97
-119
+606
Ab :
-815 -729 -247 -333 +908 -511 +244
+642 +282 -1 +620 -203 -143 -97
-765 -759 -781 -787 -627 +478 -119
-629 +624 +720 +142 +638 -745 +606
Press return to continue.
------------------------------------
x1 = -0.32091 +0.12290*s -0.64042*t
x2 = +0.27022 -0.92537*s -0.03691*t
x3 = +0.00000 +s
x4 = +0.00000 +t
x5 = +0.03805 -0.60092*s +0.30198*t
x6 = -0.28355 -0.42702*s +0.95900*t
Press return to continue
Press X to stop