Mathc matrices/c24q
Installer et compiler ces fichiers dans votre répertoire de travail.
c03b.c |
---|
/* ------------------------------------ */
/* Save as : c03b.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
/* ------------------------------------ */
#define RA R3
#define CA C3
#define RX R3
#define CX C1
/* ------------------------------------ */
/* ------------------------------------ */
int main(void)
{
double a[RA*CA]={
+3, -4, -2,
+5, -3, -1,
+4, -3, -1
};
double x[RX*CX]={
+23.00,
+14.00,
+21.00
};
double **A = ca_A_mR(a, i_mR(RA,CA));
double **X = ca_A_mR(x, i_mR(RX,CX));
double **AX = i_mR(RA,CX) ;
clrscrn();
printf(" In the Standard basis\n\n"
" Find T(x) = A*x \n\n"
" A : ");
p_mR(A,S8,P2,C7);
printf(" x : ");
p_mR(X,S8,P2,C7);
printf(" A*x");
p_mR(mul_mR(A,X,AX),S8,P2,C7);
stop();
f_mR(A);
f_mR(X);
f_mR(AX);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Calculons T([x]) = A*[x] Exemple de sortie écran :
------------------------------------
In the Standard basis
Find T(x) = A*x
A :
+3.00 -4.00 -2.00
+5.00 -3.00 -1.00
+4.00 -3.00 -1.00
x :
+23.00
+14.00
+21.00
A*x
-29.00
+52.00
+29.00
Press return to continue.