Mathc matrices/cq068
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00i.c |
---|
/* ------------------------------------ */
/* Save as : c00i.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 **kv = i_mR(r,C1);
double k = r_I(9);
clrscrn();
printf(" u :");
p_mR(u,S3,P0,C6);
printf(" v :");
p_mR(v,S3,P0,C6);
printf(" k*v :");
p_mR(smul_mR(k,v,kv),S3,P0,C6);
stop();
clrscrn();
printf(" k<u,v> = <u,kv> \n\n");
printf(" k<u,v> = %.0f \n", k*dot_R(u,v));
printf(" <u,kv> = %.0f \n\n", dot_R(u,kv));
f_mR(u);
f_mR(v);
f_mR(kv);
}
/* ------------------------------------ */
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 :
+8
-7
+7
+9
v :
+5
-2
+9
-7
k*v :
-30
+12
-54
+42
Press return to continue.
k<u,v> = <u,kv>
k<u,v> = -324
<u,kv> = -324
Press return to continue
Press X to stop