Mathc matrices/c20u
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00b.c |
---|
/* ------------------------------------ */
/* Save as : c00b.c */
/* ------------------------------------ */
#include "v_a.h"
#include "dot_trac.h"
/* ------------------------------------ */
void fun(void)
{
double a[R2*C2]={ 1,2,
3,4};
double b[R2*C2]={-1,0,
3,2};
double k = 3;
double **A = ca_A_mR(a,i_mR(R2,C2));
double **B = ca_A_mR(b,i_mR(R2,C2));
double **kB = smul_mR(k,B,ca_A_mR(b,i_mR(R2,C2)));
clrscrn();
printf(" A :");
p_mR(A,S3,P0,C6);
printf(" B :");
p_mR(B,S3,P0,C6);
printf(" %.0f B :",k);
p_mR(kB,S3,P0,C6);
printf(" <A,kB> = k<A,B> [Homogeneity axiom] \n\n");
printf(" <A,kB> = %.0f \n", dot_TR_R(A,kB));
printf(" k<A,B> = %.0f \n\n", k* dot_TR_R(A,B));
f_mR(A);
f_mR(B);
f_mR(kB);
}
/* ------------------------------------ */
int main(void)
{
fun();
stop();
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
------------------------------------
A :
+1 +2
+3 +4
B :
-1 +0
+3 +2
3 B :
-3 +0
+9 +6
<A,kB> = k<A,B> [Homogeneity axiom]
<A,kB> = 48
k<A,B> = 48
Press return to continue.