Mathc complexes/a218
Apparence
Installer et compiler ce fichier dans votre répertoire de travail.
c00b.c |
|---|
/* ------------------------------------ */
/* Save as : c00b.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
int main(void)
{
double u_T[R1*(C3*C2)] ={ +6,-8, -7,+6, +2,+2};
double v_T[R1*(C3*C2)] ={ -1,-2, +3,+9, +6,-1};
double **U_T = ca_A_mZ(u_T,i_mZ(R1,C3));
double **V_T = ca_A_mZ(v_T,i_mZ(R1,C3));
double **UxV_T = i_mZ(R1, C3);
double **UxV = i_mZ(R3, C1);
double **A = m1_mZ(i_mZ(R3, C3));
double **U = transpose_mZ(U_T,i_mZ(R3, C1));
c_r_mZ(U_T, R1, A, R1);
c_r_mZ(U_T, R1, A, R2);
c_r_mZ(V_T, R1, A, R3);
UxV_mZ(U_T,V_T,UxV_T);
ctranspose_mZ(UxV_T, UxV);
clrscrn();
printf(" u_t :");
p_mZ(U_T, S4, P0, S3, P0, C6);
printf(" v_t :");
p_mZ(V_T, S4, P0, S3, P0, C6);
printf(" uxv_t :");
p_mZ(UxV_T, S4, P0, S3, P0, C6);
printf(" u.(u x v) == "); p_Z(dot_Z(U, UxV),S3,P0, S3,P0); printf("\n");
printf(" det(A) == "); p_Z(det_Z(A), S3,P0, S3,P0); printf("\n\n");
f_mZ(U_T);
f_mZ(V_T);
f_mZ(UxV_T);
f_mZ(UxV);
f_mZ(A);
stop();
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Les vecteurs en mathématiques sont supposés être des vecteurs colonnes, c'est pour cela que j'utilise _T pour afficher des vecteurs lignes.
Exemple de sortie écran :
u_t :
+6 -8i -7 +6i +2 +2i
v_t :
-1 -2i +3 +9i +6 -1i
uxv_t :
-24+19i -26+48i +71+22i
u.(u x v) == +0 -0i
det(A) == +0 -0i
Press return to continue.