Mathc matrices/c17a
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
#define RA R2
#define CA C7
#define Cb C1
/* ------------------------------------ */
void fun(void)
{
double a[RA*CA]={
+381, +184, +659, -768, -313, +623, +2,
+352, +26, +346, -675, -421, -595, -364
};
double tb[RA*Cb]={
-286,
+33
};
double **A = ca_A_mR(a, i_mR(RA,CA ));
double **b = ca_A_mR(tb, i_mR(RA,C1));
double **Ab = i_Abr_Ac_bc_mR( RA, CA, Cb);
/* i_Abr_Ac_bc_mR(R_Ab,C_A,C_b)); */
clrscrn();
printf(" A :");
P_mR(A,S8,P0,C7);
printf(" b :");
P_mR(b,S8,P0,C7);
printf(" Ab :");
c_A_b_Ab_mR(A,b,Ab);
p_mR(Ab,S8,P0,C7);
stop();
clrscrn();
printf(" Copy/Past into the octave window.\n\n");
p_Octave_mR(Ab,"Ab",P0);
printf("\n rref(Ab,.00000000001)\n\n");
printf(" GJ_TP_mR(Ab) :");
GJ_TP_mR(Ab);
p_mR(Ab,S10,P4,C7);
stop();
f_mR(Ab);
f_mR(b);
f_mR(A);
}
/* ------------------------------------ */
int main(void)
{
fun();
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Nous utilisons la fonction GJ_TP_mR(Ab); pour résoudre ce système.
Exemple de sortie écran :
-------------------------------------------
A :
+381, +184, +659, -768, -313, +623, +2,
+352, +26, +346, -675, -421, -595, -364
b :
-286,
+33
Ab :
+381 +184 +659 -768 -313 +623 +2
+352 +26 +346 -675 -421 -595 -364
-286
+33
Press return to continue.
-------------------------------------------
Copy/Past into the octave window.
Ab=[
+381,+184,+659,-768,-313,+623,+2,-286;
+352,+26,+346,-675,-421,-595,-364,+33]
rref(Ab,.00000000001)
GJ_TP_mR(Ab) :
+1.0000 +0.0000 +0.8481 -1.8999 -1.2636 -2.2908 -1.2218
-0.0000 +1.0000 +1.8253 -0.2399 +0.9155 +8.1293 +2.5407
+0.2462
-2.0642
Press return to continue.