Mathc matrices/c20t
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.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 **A = ca_A_mR(a,i_mR(R2,C2));
double **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(" <A,B> = %.0f \n\n", dot_TR_R(A,B));
printf(" <B,A> = %.0f \n\n", dot_TR_R(B,A));
f_mR(A);
f_mR(B);
}
/* ------------------------------------ */
int main(void)
{
fun();
stop();
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
------------------------------------
A :
+1 +2
+3 +4
B :
-1 +0
+3 +2
<A,B> = 16
<B,A> = 16
Press return to continue.