text
stringlengths 0
211k
|
---|
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 **U_T = ca_A_mR(u_T , i_mR(R1, C3));
|
double **UxU_T = i_mR(R1, C3);
|
double **A = rp_mR(i_mR(R3, C3), 1);
|
// (u x u)
|
c_r_mR(U_T, R1, A, R2);
|
c_r_mR(U_T, R1, A, R3);
|
c_s_mR(cofactor_R(A, R1, C1), UxU_T, R1, C1);
|
c_s_mR(cofactor_R(A, R1, C2), UxU_T, R1, C2);
|
c_s_mR(cofactor_R(A, R1, C3), UxU_T, R1, C3);
|
clrscrn();
|
printf(" u_T :");
|
p_mR(U_T, S4, P0, C6);
|
printf("\n\n"
|
" If u and v are colinear then u x v == 0\n\n"
|
" (uxu) :" );
|
p_mR(UxU_T, S4, P0, C6);
|
stop();
|
f_mR(U_T);
|
f_mR(UxU_T);
|
f_mR(A);
|
/* ------------------------------------ */
|
int main(void)
|
fun();
|
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 :
|
+4 +2 +5
|
If u and v are colinear then u x v == 0
|
(uxu) :
|
-0 +0 +0
|
Press return to continue.
|
Mathc matrices/a253
|
Application
|
Installer et compiler ces fichiers dans votre répertoire de travail.
|
/* Save as : inv_r.c */
|
void fun(int r)
|
double **A = r_mR(i_mR(r,r),9999.);
|
double **Inv = i_mR(r,r);
|
double **ID = i_mR(r,r);
|
clrscrn();
|
printf(" Copy/Past into the octave window.\n\n");
|
p_Octave_mR(A,"A",P0);
|
printf(" inv(A)\n");
|
pE_mR(inv_mR(A,Inv),S12,P4,C4);
|
stop();
|
clrscrn();
|
printf(" inv(A)*A\n");
|
p_mR(mul_mR(Inv,A,ID),S0,P4,C8);
|
printf(" A*inv(A)\n");
|
p_mR(mul_mR(A,Inv,ID),S0,P4,C8);
|
f_mR(ID);
|
f_mR(Inv);
|
f_mR(A);
|
/* ------------------------------------ */
|
int main(void)
|
time_t t;
|
srand(time(&t));
|
do
|
fun(rp_I(RC4)+C1);
|
} while(stop_w());
|
return 0;
|
/* ------------------------------------ */
|
Vérifier avec octave.
|
Exemple de sortie écran :
|
Copy/Past into the octave window.
|
A=[
|
-4532,-7887,+3757,-9980,-1633;
|
-5915,+8415,+3925,+2667,-3612;
|
+8971,+6896,+9892,+1557,-7736;
|
+976,+4251,-3176,+7797,+7083;
|
+1996,+8007,-7833,-5417,-6939]
|
inv(A)
|
+1.2847e-05 -7.7703e-05 +5.7116e-05 +4.6001e-05
|
+1.0627e-04 +3.7942e-05 +4.6980e-05 +1.5877e-04
|
+8.3529e-05 +2.4906e-05 +5.7843e-05 +6.6634e-05
|
-1.8780e-04 +1.8080e-05 -4.8339e-05 -1.6178e-04
|
+1.7864e-04 -2.0799e-05 +4.3082e-05 +2.4752e-04
|
+2.0704e-05
|
+6.4934e-05
|
-2.9092e-05
|
-7.6465e-05
|
+2.9303e-05
|
Press return to continue.
|
inv(A)*A
|
+1.0000 -0.0000 -0.0000 -0.0000 +0.0000
|
+0.0000 +1.0000 -0.0000 +0.0000 -0.0000
|
+0.0000 +0.0000 +1.0000 +0.0000 +0.0000
|
-0.0000 -0.0000 +0.0000 +1.0000 +0.0000
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.