Mathc matrices/c21f
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00e.c |
---|
/* ------------------------------------ */
/* Save as : c00e.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(void)
{
double u[R2*C1]={ 1,
1};
double v[R2*C1]={ 3,
2};
double **U = ca_A_mR(u,i_mR(R2,C1));
double **V = ca_A_mR(v,i_mR(R2,C1));
clrscrn();
printf(" U :");
p_mR(U,S3,P0,C6);
printf(" V :");
p_mR(V,S3,P0,C6);
printf(" d(U,V) = ||U-V|| = (<U-V,U-V>)^1/2 \n\n");
printf(" d(U,V) = %.3f \n", dist_R(U,V));
printf(" d(V,U) = %.3f \n\n", dist_R(V,U));
f_mR(U);
f_mR(V);
}
/* ------------------------------------ */
int main(void)
{
fun();
stop();
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
------------------------------------
U :
+1
+1
V :
+3
+2
d(U,V) = ||U-V|| = (<U-V,U-V>)^1/2
d(U,V) = 2.236
d(V,U) = 2.236
Press return to continue.