Mathc matrices/a45
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00.c |
---|
/* ------------------------------------ */
/* Save as : c00.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **Ab = r_singular_Ab_mR(i_Abr_Ac_bc_mR(r,r,C1),9);
double **A = c_Ab_A_mR(Ab,i_mR(r,r));
double **b = c_Ab_b_mR(Ab,i_mR(r,C1));
clrscrn();
printf(" A :");
p_mR(A,S4,P0,C7);
printf(" b :");
r_mR(b,9.); /* I change the value of b */
p_mR(b,S4,P0,C7);
printf(" Ab :");
P_mR(c_A_b_Ab_mR(A,b,Ab),S4,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");
stop();
clrscrn();
printf(" gj_mR(Ab) :");
gj_PP_mR(Ab,YES);
p_mR(Ab,S10,P4,C7);
// is_system_consistent_mR(Ab);
f_mR(Ab);
f_mR(b);
f_mR(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(R4);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Créer une matrice pour le travail ci-dessus.
Exemple de sortie écran :
------------------------------------
A :
+5 -6 -6 -5
-3 -1 +3 -5
+5 -6 -6 -5
-3 -1 +3 -5
b :
-8
-4
+2
-1
Ab :
+5, -6, -6, -5, -8,
-3, -1, +3, -5, -4,
+5, -6, -6, -5, +2,
-3, -1, +3, -5, -1
Press return to continue.
------------------------------------
Copy/Past into the octave window.
Ab=[
+5,-6,-6,-5,-8;
-3,-1,+3,-5,-4;
+5,-6,-6,-5,+2;
-3,-1,+3,-5,-1]
rref(Ab,.00000000001)
Press return to continue.
------------------------------------
gj_mR(Ab) :
+1.0000 +0.0000 -1.0435 +1.0870 +0.6957
-0.0000 +1.0000 +0.1304 +1.7391 +1.9130
+0.0000 +0.0000 +0.0000 -0.0000 +10.0000
+0.0000 +0.0000 +0.0000 +0.0000 +3.0000
Press return to continue
Press X return to stop .