Mathc matrices/c091a
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = i_mR(r,r);
double **Inv = i_mR(r,r);
clrscrn();
printf(" A\n");
p_mR(r_mR(A,9999.),S8,P0,C6);
stop();
clrscrn();
printf(" invgj_mR(A,invA); gauss jordan (AId)\n");
pE_mR(invgj_mR(A,Inv),S12,P4,C6);
printf(" inv_mR(A,Inv); det,...,adjoint,... \n");
pE_mR(inv_mR(A,Inv),S12,P4,C6);
stop();
clrscrn();
printf(" Copy/Past into the octave window.\n\n");
p_Octave_mR(A,"A",P0);
printf(" inv(A)\n");
pE_mR(Inv,S12,P4,C6);
f_mR(Inv);
f_mR(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(C2)+C4);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
A
-57 +6812 +5568
+5330 +1020 +7124
+8836 -4887 -1189
Press return to continue.
invgj_mR(A,invA); gauss jordan (AId)
+1.2226e-04 -6.9537e-05 +1.5591e-04
+2.5209e-04 -1.7876e-04 +1.0946e-04
-1.2757e-04 +2.1799e-04 -1.3232e-04
inv_mR(A,Inv); det,...,adjoint,...
+1.2226e-04 -6.9537e-05 +1.5591e-04
+2.5209e-04 -1.7876e-04 +1.0946e-04
-1.2757e-04 +2.1799e-04 -1.3232e-04
Press return to continue.
Copy/Past into the octave window.
A=[
-57,+6812,+5568;
+5330,+1020,+7124;
+8836,-4887,-1189]
inv(A)
+1.2226e-04 -6.9537e-05 +1.5591e-04
+2.5209e-04 -1.7876e-04 +1.0946e-04
-1.2757e-04 +2.1799e-04 -1.3232e-04
Press return to continue
Press X to stop