Mathc matrices/Fichiers c : mul dia7
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00c.c |
---|
/* ------------------------------------ */
/* ------------------------------------ */
/* Save as : c00c.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(void)
{
double a[R3*C3]={ 2,9,9,
1,9,9,
1,9,9 };
double id[R3*C3]={1./2.,0,0,
0,1,0,
0,0,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(" One for the pivot \n\n");
printf(" ID :");
p_mR(ID,S3,P2,C6);
printf(" A :");
p_mR(A,S3,P2,C6);
printf(" A ID : Multiply a column by a nonzero constant c..");
p_mR(AID,S3,P2,C6);
f_mR(A);
f_mR(ID);
f_mR(AID);
}
/* ------------------------------------ */
int main(void)
{
fun();
stop();
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Mettre le pivot à 1 :
Exemple de sortie écran :
One for the pivot
ID :
+0.50 +0.00 +0.00
+0.00 +1.00 +0.00
+0.00 +0.00 +1.00
A :
+2.00 +9.00 +9.00
+1.00 +9.00 +9.00
+1.00 +9.00 +9.00
A ID : Multiply a column by a nonzero constant c..
+1.00 +9.00 +9.00
+0.50 +9.00 +9.00
+0.50 +9.00 +9.00
Press return to continue.