text
stringlengths
0
211k
x4 - x3 = 20
-x1 - x4 = -100 + 30
Soit
x1 +0 +0 +0 20 + 10 // A
+0 x3 +0 +0 60 - 10 -30 // B
+0 -x3 x4 +0 +20 // C
-x1 +0 -x4 +0 -100 + 30 // D
Le code en langage C :
double ab[RA*(CA+Cb)]={
// x1 x3 x4
+1, +0, +0, +0, +20+10, // A
+0, +1, +0, +0, +60 -10 -30, // B
+0, -1, +1, +0, +20, // C
-1, +0, -1, +0, -100+30, // D
La solution est donné par la résolution du système :
x1 x3 x4
+1 +0 +0 +0 +30
+0 +1 +0 +0 +20
+0 +0 +1 +0 +40
+0 +0 +0 +0 +0
x1 = +30; x3 = +20; x4 = +40;
et x2 = +10; x5 = +30;
Mathc matrices/a213
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c00a.c */
int main(void)
double ab[RA*(CA+Cb)]={
// x1 x3 x4
+1, +0, +0, +0, +20+10, // A
+0, +1, +0, +0, +60 -10 -30, // B
+0, -1, +1, +0, +20, // C
-1, +0, -1, +0, -100+30, // D
double **Ab = ca_A_mR(ab,i_Abr_Ac_bc_mR(RA,CA,Cb));
double **A = c_Ab_A_mR(Ab,i_mR(RA,CA));
double **b = c_Ab_b_mR(Ab,i_mR(RA,Cb));
clrscrn();
printf(" A :");
p_mR(A,S5,P0,C7);
printf(" b :");
p_mR(b,S5,P0,C7);
printf(" Ab :");
p_mR(Ab,S5,P0,C7);
getchar();
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) :\n\n"
" x1 x3 x4 ");
gj_TP_mR(Ab);
p_mR(Ab,S5,P0,C7);
stop();
f_mR(Ab);
f_mR(b);
f_mR(A);
return 0;
/* ------------------------------------ */
Exemple de sortie écran :
A :
+1 +0 +0 +0
+0 +1 +0 +0
+0 -1 +1 +0
-1 +0 -1 +0
b :
+30
+20
+20
-70
Ab :
+1 +0 +0 +0 +30
+0 +1 +0 +0 +20
+0 -1 +1 +0 +20
-1 +0 -1 +0 -70
------------------------------------
Copy/Past into the octave window.
Ab=[
+1,+0,+0,+0,+30;
+0,+1,+0,+0,+20;
+0,-1,+1,+0,+20;
-1,+0,-1,+0,-70]
rref(Ab.00000000001)
gj_TP_mR(Ab) :
x1 x3 x4
+1 +0 +0 +0 +30
+0 +1 +0 +0 +20
+0 +0 +1 +0 +40
+0 +0 +0 +0 +0
Press return to continue.
Mathc matrices/a214