Mathc matrices/e12d3
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **Q = r_Q_mR( i_mR(r,r), 9);
double **Q_T = transpose_mR(Q,i_mR(r,r));
double **Ide = i_mR(r,r);
clrscrn();
printf(" Q : An orthonormal matrix");
p_mR(Q, S7,P3, C6);
printf(" Ide = Q * Q_T : ");
mul_mR(Q,Q_T, Ide);
p_mR(Ide, S8,P4, C6);
printf(" det_R(Q) = %+.4f\n",det_R(Q));
f_mR(Q);
f_mR(Q_T);
f_mR(Ide);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R3)+R2);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Matrices orthonormales :
Exemple de sortie écran :
Q : An orthonormal matrix
+0.815 +0.332 +0.251 -0.403
-0.181 -0.510 +0.787 -0.296
-0.091 -0.327 -0.526 -0.780
+0.543 -0.723 -0.202 +0.376
Ide = Q * Q_T :
+1.0000 +0.0000 -0.0000 +0.0000
+0.0000 +1.0000 +0.0000 -0.0000
-0.0000 +0.0000 +1.0000 +0.0000
+0.0000 -0.0000 +0.0000 +1.0000
det_R(Q) = +1.0000
Press return to continue
Press X to stop