Mathc matrices/c24p
Installer et compiler ces fichiers dans votre répertoire de travail.
c03a.c |
---|
/* ------------------------------------ */
/* Save as : c03a.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 = mul_mR(B,X_B, i_mR(RX,CX));
clrscrn();
printf(" B is the change of basis matrix for the basis \"B\" \n\n"
" B :");
p_mR(B,S8,P2,C7);
printf(" x_B :");
p_mR(X_B,S8,P2,C7);
printf(" Compute x_B in the standard basis :\n\n"
" x = B*x_B :");
p_mR(X,S8,P2,C7);
stop();
f_mR(B);
f_mR(X_B);
f_mR(X);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Nous allons introduire ces valeurs dans les fichiers suivants. Exemple de sortie écran :
------------------------------------
B is the change of basis matrix for the basis "B"
B :
+1.00 +2.00 +6.00
+3.00 +4.00 +1.00
+5.00 +5.00 +2.00
x_B :
+1.00
+2.00
+3.00
Compute x_B in the standard basis :
x = B*x_B :
+23.00
+14.00
+21.00
Press return to continue.