text
stringlengths 0
211k
|
---|
void fun(void) |
double **U_T = r_mR(i_mR(R1, C3), 9); |
double **V_T = r_mR(i_mR(R1, C3), 9); |
double **U = transpose_mR(U_T, i_mR(R3, C1)); |
double **V = transpose_mR(V_T, i_mR(R3, C1)); |
double **UxV_T = i_mR(R1, C3); |
double **UxV = i_mR(R3, C1) ; |
double **A = rp_mR(i_mR(R3, C3), 1); |
c_r_mR(U_T, R1, A, R2); |
c_r_mR(V_T, R1, A, R3); |
c_s_mR(cofactor_R(A, R1, C1), UxV_T, R1, C1); |
c_s_mR(cofactor_R(A, R1, C2), UxV_T, R1, C2); |
c_s_mR(cofactor_R(A, R1, C3), UxV_T, R1, C3); |
transpose_mR(UxV_T, UxV); |
clrscrn(); |
printf(" u_t :"); |
p_mR(U_T, S4, P0, C6); |
printf(" v_t :"); |
p_mR(V_T, S4, P0, C6); |
printf(" uxv_t :"); |
p_mR(UxV_T, S4, P0, C6); |
printf("\n" |
" ||u x v||**2 == ||u||**2 ||v||**2 - (u.v)**2 \n\n" |
" ||u x v||**2 == %+.4f \n" |
" ||u||**2 ||v||**2 - (u.v)**2 == %+.4f \n\n", |
pow( norm_uv_R(UxV), 2.), |
pow( norm_uv_R(U ), 2.) |
* pow( norm_uv_R(V ), 2.) |
- pow( dot_uv_R(U, V), 2.) |
f_mR(U_T); |
f_mR(V_T); |
f_mR(UxV_T); |
f_mR(U); |
f_mR(V); |
f_mR(UxV); |
f_mR(A); |
/* ------------------------------------ */ |
int main(void) |
time_t t; |
srand(time(&t)); |
do |
fun(); |
} while(stop_w()); |
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 : |
-8 -7 +6 |
v_t : |
+8 -1 -4 |
uxv_t : |
+34 +16 +64 |
||u x v||**2 == ||u||**2 ||v||**2 - (u.v)**2 |
||u x v||**2 == +5508.0000 |
||u||**2 ||v||**2 - (u.v)**2 == +5508.0000 |
Press return to continue |
Press X return to stop |
Mathc matrices/a241 |
Application |
Installer et compiler ces fichiers dans votre répertoire de travail. |
/* Save as : c00a.c */ |
void fun(void) |
double u_T[R1*C3] = { 4, 2, 5}; |
double v_T[R1*C3] = { 3, 4, 1}; |
double **U_T = ca_A_mR(u_T , i_mR(R1, C3)); |
double **V_T = ca_A_mR(v_T , i_mR(R1, C3)); |
double **U = transpose_mR(U_T, i_mR(R3, C1)); |
double **V = transpose_mR(V_T, i_mR(R3, C1)); |
double **UxV_T = i_mR(R1, C3); |
double **UxV = i_mR(R3, C1) ; |
double **A = rp_mR(i_mR(R3, C3), 1); |
c_r_mR(U_T, R1, A, R2); |
c_r_mR(V_T, R1, A, R3); |
c_s_mR(cofactor_R(A, R1, C1), UxV_T, R1, C1); |
c_s_mR(cofactor_R(A, R1, C2), UxV_T, R1, C2); |
c_s_mR(cofactor_R(A, R1, C3), UxV_T, R1, C3); |
transpose_mR(UxV_T, UxV); |
clrscrn(); |
printf(" u_t :"); |
p_mR(U_T, S4, P0, C6); |
printf(" v_t :"); |
p_mR(V_T, S4, P0, C6); |
printf(" uxv_t :"); |
p_mR(UxV_T, S4, P0, C6); |
printf("\n" |
" ||u x v||**2 == ||u||**2 ||v||**2 - (u.v)**2 \n\n" |
" ||u x v||**2 == %+.4f \n" |
" ||u||**2 ||v||**2 - (u.v)**2 == %+.4f \n\n\n", |
pow( norm_uv_R(UxV), 2.), |
pow( norm_uv_R(U ), 2.) |
* pow( norm_uv_R(V ), 2.) |
- pow( dot_uv_R(U, V), 2.) |
stop(); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.