Mathc complexes/a237
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00b.c |
---|
/* ------------------------------------ */
/* Save as : c01b.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
/* ------------------------------------ */
#define RB R2
#define CB C2
#define RU R2
#define CU C1
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
{
double b[RB*(CB*C2)]={
+2, 2, +1, 5,
+2, 0, +3, 5
};
double u_s[RU*(CU*C2)]={
-13, +5,
-13, -3
};
double **B = ca_A_mZ( b,i_mZ(RB,CB));
double **invB = ca_A_mZ( b,i_mZ(RB,CB));
double **U_s = ca_A_mZ(u_s,i_mZ(RU,CU));
double **U_b = i_mZ(RU,CU) ;
clrscrn();
printf(" B is the change of basis matrix for \"B\" \n\n"
" Find the coordinate of U in the \"B\" basis.\n\n"
" B : ");
p_mZ(B, S4,P0, S3,P0, C7);
printf(" U_s : the coordinate of U in the Standard basis");
p_mZ(U_s, S4,P0, S3,P0, C7);
printf(" invB : ");
p_mZ(inv_mZ(B,invB), S8,P4, S8,P4, C7);
printf(" invB*U_s = U_b \n\n"
" U_b : the coordinate of U in the \"B\" basis");
p_mZ(mul_mZ(invB,U_s,U_b), S6,P1, S6,P1, C7);
stop();
f_mZ(U_s);
f_mZ(U_b);
f_mZ(B);
f_mZ(invB);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Matrice de passage inversible :
Soit B la matrice de changement de base de B
Trouver les coordonnées de U dans la base B :
B * U_b = U_s invB B * U_b = invB U_s U_b = invB U_s
Exemple de sortie écran :
------------------------------------
B is the change of basis matrix for "B"
Find the coordinate of U in the "B" basis.
B :
+2 +2i +1 +5i
+2 +0i +3 +5i
U_s : the coordinate of U in the Standard basis
-13 +5i
-13 -3i
invB :
+0.1667 -0.6667i -0.3333 +0.5000i
+0.1667 +0.1667i -0.0000 -0.3333i
invB*U_s = U_b
U_b : the coordinate of U in the "B" basis
+7.0 +4.0i
-4.0 +3.0i
Press return to continue.