Mathc matrices/a263
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00c.c |
---|
/* ------------------------------------ */
/* save as : c00c.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
#define RA R3
#define CA C3
#define CB C3
/* ------------------------------------ */
void fun(void)
{
double **A = r_Q_mR( i_mR(RA,CA),99);
double **B = r_mR( i_mR(RA,CB),99.);
double **Ab = i_Abr_Ac_bc_mR(RA,CA,CB);
double **A_T = transpose_mR(A, i_mR(RA,CA));
double **A_TB = mul_mR(A_T,B, i_mR(RA,CB));
clrscrn();
printf(" A : Orthonormal");
p_mR(A, S9,P4, C3);
printf(" b[*] :");
p_mR(B, S9,P4, C3);
printf(" Ab :");
c_A_b_Ab_mR(A,B,Ab);
p_mR(Ab, S9,P4, C3);
stop();
clrscrn();
printf(" gj_mR(Ab) :");
gj_TP_mR(Ab);
p_mR(Ab, S9,P4, C3);
printf(" A_T * B ");
p_mR(A_TB, S9,P4, C3);
f_mR(A);
f_mR(B);
f_mR(Ab);
f_mR(A_T);
f_mR(A_TB);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun();
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Résoudre un système d'équation quand A est une matrice orthonormale : Ici B est composé de trois vecteurs. Exemple de sortie écran :
A : Orthonormal
+0.7641 +0.3158 +0.5625
-0.6367 +0.2293 +0.7362
+0.1035 -0.9207 +0.3763
b[*] :
-13.0000 -39.0000 +1.0000
-77.0000 +22.0000 +71.0000
+96.0000 +73.0000 -2.0000
Ab :
+0.7641 +0.3158 +0.5625
-0.6367 +0.2293 +0.7362
+0.1035 -0.9207 +0.3763
-13.0000 -39.0000 +1.0000
-77.0000 +22.0000 +71.0000
+96.0000 +73.0000 -2.0000
Press return to continue.
gj_mR(Ab) :
+1.0000 +0.0000 +0.0000
+0.0000 +1.0000 +0.0000
+0.0000 +0.0000 +1.0000
+49.0296 -36.2548 -44.6520
-110.1505 -74.4816 +18.4392
-27.8740 +21.7273 +52.0788
A_T * B
+49.0296 -36.2548 -44.6520
-110.1505 -74.4816 +18.4392
-27.8740 +21.7273 +52.0788
Press return to continue
Press X return to stop