Mathc matrices/c24t
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
/* ------------------------------------ */
#define RA R4
#define CA C4
#define RX R4
#define CX C1
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
{
double x_B[RX*CX]={
+1,
+2,
+3,
+4
};
double b[RA*CA]={
+1, +2, +6, +6,
+3, +2, +1, +6,
+5, +5, +3, +6,
+5, +5, +2, +4,
};
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 +6.00
+3.00 +2.00 +1.00 +6.00
+5.00 +5.00 +3.00 +6.00
+5.00 +5.00 +2.00 +4.00
x_B : (x in the base B)
+1.00
+2.00
+3.00
+4.00
x_S = B x_B : (x in the Standard basis)
+47.00
+34.00
+48.00
+37.00
Press return to continue.