Mathc matrices/cq066
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00g.c |
---|
/* ------------------------------------ */
/* Save as : c00g.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **u = r_mR(i_mR(r,C1),9.);
double **v = r_mR(i_mR(r,C1),9.);
double **w = r_mR(i_mR(r,C1),9.);
double **vmnsw = i_mR(r,C1);
clrscrn();
printf(" u :");
p_mR(u,S3,P0,C6);
printf(" v :");
p_mR(v,S3,P0,C6);
printf(" v-w :");
p_mR(sub_mR(v,w,vmnsw),S3,P0,C6);
stop();
clrscrn();
printf(" <u,v-w> = <u,v>-<u,w> \n\n");
printf(" <u,v-w> = %.0f \n", dot_R(u,vmnsw));
printf(" <u,v>-<u,w> = %.0f \n\n", dot_R(u,v)-dot_R(u,w));
f_mR(u);
f_mR(v);
f_mR(w);
f_mR(vmnsw);
}
/* ------------------------------------ */
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 :
-5
+6
-9
+9
-4
v :
-8
-4
-4
-5
+4
v-w :
-9
-10
-10
-13
-2
Press return to continue.
<u,v-w> = <u,v>-<u,w>
<u,v-w> = -34
<u,v>-<u,w> = -34
Press return to continue
Press X to stop