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