Mathc matrices/c24p
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
/* ------------------------------------ */
#define RA R3
#define CA C3
#define RX R3
#define CX C1
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
{
double x_B[RX*CX]={
+1,
+2,
+3
};
double b[RA*CA]={
+1, +2, +6,
+3, +4, +1,
+5, +5, +2
};
double **B = ca_A_mR(b, i_mR(RA,CA));
double **X_B = ca_A_mR(x_B, i_mR(RX,CX));
double **X_S = mul_mR(B,X_B, i_mR(RX,CX));
clrscrn();
printf(" B is the base change matrix for base \"B\" \n\n"
" B :");
p_mR(B,S8,P2,C7);
printf(" x_B : (x in the base B)");
p_mR(X_B,S8,P2,C7);
printf(" x_S = B x_B : (x in the Standard basis)");
p_mR(X_S,S8,P2,C7);
stop();
f_mR(B);
f_mR(X_B);
f_mR(X_S);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Introduisons la valeur de x en base standard dans le prochain fichier.
Exemple de sortie écran :
B is the base change matrix for base "B"
B :
+1.00 +2.00 +6.00
+3.00 +4.00 +1.00
+5.00 +5.00 +2.00
x_B : (x in the base B)
+1.00
+2.00
+3.00
x_S = B x_B : (x in the Standard basis)
+23.00
+14.00
+21.00
Press return to continue.