Mathc matrices/Fichiers c : mul dia8
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00d.c |
---|
/* ------------------------------------ */
/* ------------------------------------ */
/* Save as : c00d.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(void)
{
double a[R3*C3]={ 1, 0,0,
9, 1,0,
9,-8,1};
double id[R3*C3]={ 1, 0,0,
0, 1,0,
-9, 8,1};
double **A = ca_A_mR(a, i_mR(R3,C3));
double **ID = ca_A_mR(id,i_mR(R3,C3));
double **AID = mul_mR(A,ID,i_mR(R3,C3));
clrscrn();
printf(" Zero on the left of the pivot \n\n");
printf(" ID :");
p_mR(ID,S3,P0,C6);
printf(" A :");
p_mR(A,S3,P0,C6);
printf(" A ID : Add a constant c times one column to another.");
p_mR(AID,S3,P1,C6);
f_mR(A);
f_mR(ID);
f_mR(AID);
}
/* ------------------------------------ */
int main(void)
{
fun();
stop();
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Mettre des zéros à gauche du pivot :
Exemple de sortie écran :
Zero on the left of the pivot
ID :
+1 +0 +0
+0 +1 +0
-9 +8 +1
A :
+1 +0 +0
+9 +1 +0
+9 -8 +1
A ID : Add a constant c times one column to another.
+1.0 +0.0 +0.0
+9.0 +1.0 +0.0
+0.0 +0.0 +1.0
Press return to continue.