Mathc complexes/a332
Apparence
Les matrices orthonormales, orthogonales
Installer et compiler ces fichiers dans votre répertoire de travail.
c00c.c |
---|
/* ------------------------------------ */
/* Save as : c00c.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
/* ------------------------------------ */
#define RA R3
#define CA C3
#define CB C1
/* ------------------------------------ */
/* ------------------------------------ */
void fun(void)
{
double **A = r_q_mZ(i_mZ(RA,CA),99);
double **B = r_mZ(i_mZ(RA,CB),99.);
double **Ab = i_Abr_Ac_bc_mZ(RA,CA,CB);
double **b = i_mZ(RA,C1);
double **a = i_mZ(RA,C1);
clrscrn();
printf(" A : Orthonormal");
p_mZ(A, S8,P3, S8,P3, C4);
printf(" b :");
p_mZ(B, S8,P3, S8,P3, C4);
printf(" Ab :");
c_A_b_Ab_mZ(A,B,Ab);
p_mZ(Ab, S8,P3, S8,P3, C4);
printf(" gj_TP_mZ(Ab) :");
gj_mZ(Ab);
p_mZ(Ab, S8,P3, S8,P3, C4);
stop();
clrscrn();
c_c_mZ(B,C1,b,C1);
printf("\n <b,a[C1]> / ||a[C1]||**2 = ");
p_Z( div_Z(dot_Z(b, c_c_mZ(A,C1,a,C1)),
(dot_Z(c_c_mZ(A,C1,a,C1), c_c_mZ(A,C1,a,C1))))
,S8,P4,S8,P4);
printf("\n <b,a[C2]> / ||a[C2]||**2 = ");
p_Z( div_Z(dot_Z(b, c_c_mZ(A,C2,a,C1)),
(dot_Z(c_c_mZ(A,C2,a,C1), c_c_mZ(A,C2,a,C1))))
,S8,P4,S8,P4);
printf("\n <b,a[C3]> / ||a[C3]||**2 = ");
p_Z( div_Z(dot_Z(b, c_c_mZ(A,C3,a,C1)),
(dot_Z(c_c_mZ(A,C3,a,C1), c_c_mZ(A,C3,a,C1))))
,S8,P4,S8,P4);
printf("\n\n\n gj_mZ(Ab) :");
p_mZ(Ab, S8,P4, S8,P4, C4);
f_mZ(a);
f_mZ(b);
f_mZ(Ab);
f_mZ(B);
f_mZ(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun();
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
A : Orthonormal
+88.000 -97.000i +42.000 +44.493i +24.342 +15.959i
+95.000 +79.000i +64.339 -35.947i -9.586 -18.022i
+8.000 -58.000i +2.411 +46.066i -43.495 -36.005i
b :
+64.000 +93.000i
-14.000 -96.000i
+47.000 -87.000i
Ab :
+88.000 -97.000i +42.000 +44.493i +24.342 +15.959i +64.000 +93.000i
+95.000 +79.000i +64.339 -35.947i -9.586 -18.022i -14.000 -96.000i
+8.000 -58.000i +2.411 +46.066i -43.495 -36.005i +47.000 -87.000i
gj_TP_mZ(Ab) :
+1.000 +0.000i +0.000 +0.000i +0.000 +0.000i -0.192 +0.235i
+0.000 +0.000i +1.000 +0.000i +0.000 +0.000i +0.485 -0.707i
-0.000 +0.000i -0.000 +0.000i +1.000 +0.000i +1.346 +1.659i
Press return to continue.
<b,a[C1]> / ||a[C1]||**2 = -0.1920 +0.2346i
<b,a[C2]> / ||a[C2]||**2 = +0.4850 -0.7074i
<b,a[C3]> / ||a[C3]||**2 = +1.3465 +1.6592i
gj_mZ(Ab) :
+1.0000 +0.0000i +0.0000 +0.0000i +0.0000 +0.0000i -0.1920 +0.2346i
+0.0000 +0.0000i +1.0000 +0.0000i +0.0000 +0.0000i +0.4850 -0.7074i
-0.0000 +0.0000i -0.0000 +0.0000i +1.0000 +0.0000i +1.3465 +1.6592i
Press return to continue
Press X return to stop