Mathc matrices/cq064
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00e.c |
---|
/* ------------------------------------ */
/* Save as : c00e.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **u = m0_mR(i_mR(r,C1));
double **v = r_mR(i_mR(r,C1),9.);
clrscrn();
printf(" u :");
p_mR(u,S3,P0,C6);
printf(" v :");
p_mR(v,S3,P0,C6);
printf(" <0,v> = <v,0> \n\n");
printf(" <u,v> = v^t.u \n");
printf(" <u,v> = %.0f \n\n", dot_R(u,v));
printf(" <v,u> = u^t.v \n");
printf(" <v,u> = %.0f \n\n", dot_R(v,u));
f_mR(u);
f_mR(v);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R3)+R2);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
u :
+0
+0
+0
+0
+0
v :
+5
-5
-6
-9
-7
<0,v> = <v,0>
<u,v> = v^t.u
<u,v> = 0
<v,u> = u^t.v
<v,u> = 0
Press return to continue
Press X to stop