Mathc matrices/c23y
Installer et compiler ces fichiers dans votre répertoire de travail.
c04b.c |
---|
/* ------------------------------------ */
/* Save as : c04b.c */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
#define RA R2
#define CA C4
/* ------------------------------------ */
int main(void)
{
double a_Tb[RA*(CA+C1)]={
2,0,0,4,0,
0,3,0,5,0
};
double **A_Tb = ca_A_mR(a_Tb,i_Abr_Ac_bc_mR(RA,CA,C1));
double **A_T = c_Ab_A_mR(A_Tb,i_mR(RA,CA));
double **b = c_Ab_b_mR(A_Tb,i_mR(RA,C1));
clrscrn();
printf(" Verify if A is Basis for a Row Space by Row Reduction :\n\n");
printf(" A_T :");
p_mR(A_T,S6,P1,C10);
printf(" b :");
p_mR(b,S6,P1,C10);
printf(" A_Tb :");
p_mR(A_Tb,S6,P1,C10);
stop();
clrscrn();
printf(" The nonzero row vectors of A_Tb form a basis\n"
" for the row space of A_Tb, and hence form a \n"
" basis for the row space of A \n\n"
" A_Tb :");
p_mR(A_Tb,S7,P3,C10);
printf(" A_Tb : gj_PP_mR(A_Tb,NO) :");
gj_PP_mR(A_Tb,NO);
p_mR(A_Tb,S7,P3,C10);
stop();
f_mR(A_Tb);
f_mR(b);
f_mR(A_T);
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Trouver une projection sur un sous-espace vectoriel par une application linéaire :
- Dans cet exemple nous vérifions si les vecteurs lignes de A sont linéairement indépendant. Il ne doit pas y avoir des lignes de zéro.
Exemple de sortie écran :
------------------------------------
Verify if A is Basis for a Row Space by Row Reduction :
A_T :
+2.0 +0.0 +0.0 +4.0
+0.0 +3.0 +0.0 +5.0
b :
+0.0
+0.0
A_Tb :
+2.0 +0.0 +0.0 +4.0 +0.0
+0.0 +3.0 +0.0 +5.0 +0.0
Press return to continue.
------------------------------------
The nonzero row vectors of A_Tb form a basis
for the row space of A_Tb, and hence form a
basis for the row space of A
A_Tb :
+2.000 +0.000 +0.000 +4.000 +0.000
+0.000 +3.000 +0.000 +5.000 +0.000
A_Tb : gj_PP_mR(A_Tb,NO) :
+1.000 +0.000 +0.000 +2.000 +0.000
+0.000 +1.000 +0.000 +1.667 +0.000
Press return to continue.