Mathc complexes/a232
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00c.c |
---|
/* ------------------------------------ */
/* Save as : c00c.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
/* ------------------------------------ */
#define RA R4
#define CA C5
#define Cb C1
/* ------------------------------------ */
void fun(void)
{
double ab[RA*((CA+Cb)*C2)] ={
+2,-1, -6,+2, -7,-6, -6,+6, +7,+8, 0,0,
+2,-1, -6,+2, -7,-6, -6,+6, +7,+8, 0,0,
+2,-1, -6,+2, -7,-6, -1,+2, +6,+5, 0,0,
+2,-1, -6,+2, -7,-6, -1,+0, +4,+3, 0,0,
};
double **Ab = ca_A_mZ(ab,i_Abr_Ac_bc_mZ(RA,CA,Cb));
double **A = c_Ab_A_mZ(Ab,i_mZ(RA,CA));
double **b = c_Ab_b_mZ(Ab,i_mZ(RA,Cb));
double **B = i_mZ(RA,C3) ;
double **BT = i_mZ(C3,RA) ;
double **BTb = i_Abr_Ac_bc_mZ(C3,RA,Cb);
clrscrn();
printf("Basis for a Column Space by Row Reduction :\n\n");
printf(" A :");
p_mZ(A, S3,P0, S3,P0, C8);
printf(" b :");
p_mZ(b, S3,P0, S3,P0, C8);
printf(" Ab :");
p_mZ(Ab, S3,P0, S3,P0, C8);
stop();
clrscrn();
printf(" The leading 1’s of Ab give the position \n"
" of the columns of A which form a basis \n"
" for the column space of A \n\n"
" A :");
p_mZ(A, S6,P3, S5,P3, C5);
printf(" gj_PP_mZ(Ab) :");
p_mZ(gj_PP_mZ(Ab), S6,P3, S5,P3, C5);
stop();
clrscrn();
printf(" A :");
p_mZ(A, S6,P3, S5,P3, C5);
printf(" gj_PP_mZ(Ab) :");
p_mZ(Ab, S6,P3, S5,P3, C5);
c_c_mZ(A,C1,B,C1);
c_c_mZ(A,C4,B,C2);
c_c_mZ(A,C5,B,C3);
printf(" B :");
p_mZ(B, S8,P4, S8,P4, C4);
stop();
clrscrn();
printf(" Check if the columns of B are linearly independent\n\n"
" BT :");
p_mZ(transpose_mZ(B,BT), S4,P0, S3,P0, C4);
printf(" BTb :");
p_mZ(c_mZ(BT,BTb), S4,P0, S3,P0, C5);
printf(" gj_PP_mZ(BTb) :");
p_mZ(gj_PP_mZ(BTb), S8,P4, S8,P4, C4);
stop();
f_mZ(Ab);
f_mZ(A);
f_mZ(b);
f_mZ(B);
f_mZ(BT);
f_mZ(BTb);
}
/* ------------------------------------ */
int main(void)
{
fun();
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
La position des pivots de Ab donne la position des colonnes de A qui forment une base pour l'espace colonnes de A.
Exemple de sortie écran :
------------------------------------
Basis for a Column Space by Row Reduction :
A :
+2 -1i -6 +2i -7 -6i -6 +6i +7 +8i
+2 -1i -6 +2i -7 -6i -6 +6i +7 +8i
+2 -1i -6 +2i -7 -6i -1 +2i +6 +5i
+2 -1i -6 +2i -7 -6i -1 +0i +4 +3i
b :
+0 +0i
+0 +0i
+0 +0i
+0 +0i
Ab :
+2 -1i -6 +2i -7 -6i -6 +6i +7 +8i +0 +0i
+2 -1i -6 +2i -7 -6i -6 +6i +7 +8i +0 +0i
+2 -1i -6 +2i -7 -6i -1 +2i +6 +5i +0 +0i
+2 -1i -6 +2i -7 -6i -1 +0i +4 +3i +0 +0i
Press return to continue.
------------------------------------
The leading 1’s of Ab give the position
of the columns of A which form a basis
for the column space of A
A :
+2.000-1.000i -6.000+2.000i -7.000-6.000i -6.000+6.000i +7.000+8.000i
+2.000-1.000i -6.000+2.000i -7.000-6.000i -6.000+6.000i +7.000+8.000i
+2.000-1.000i -6.000+2.000i -7.000-6.000i -1.000+2.000i +6.000+5.000i
+2.000-1.000i -6.000+2.000i -7.000-6.000i -1.000+0.000i +4.000+3.000i
gj_PP_mZ(Ab) :
+1.000+0.000i -2.800-0.400i -1.600-3.800i -3.600+1.200i +1.200+4.600i
+0.000+0.000i +0.000+0.000i -0.000+0.000i +1.000+0.000i +0.246-0.705i
+0.000+0.000i -0.000-0.000i +0.000-0.000i +0.000+0.000i +1.000+0.000i
+0.000+0.000i +0.000-0.000i +0.000+0.000i +0.000+0.000i +0.000+0.000i
+0.000+0.000i
+0.000+0.000i
+0.000+0.000i
+0.000+0.000i
Press return to continue.
------------------------------------
A :
+2.000-1.000i -6.000+2.000i -7.000-6.000i -6.000+6.000i +7.000+8.000i
+2.000-1.000i -6.000+2.000i -7.000-6.000i -6.000+6.000i +7.000+8.000i
+2.000-1.000i -6.000+2.000i -7.000-6.000i -1.000+2.000i +6.000+5.000i
+2.000-1.000i -6.000+2.000i -7.000-6.000i -1.000+0.000i +4.000+3.000i
gj_PP_mZ(Ab) :
+1.000+0.000i -2.800-0.400i -1.600-3.800i -3.600+1.200i +1.200+4.600i
+0.000+0.000i +0.000+0.000i -0.000+0.000i +1.000+0.000i +0.246-0.705i
+0.000+0.000i -0.000-0.000i +0.000-0.000i +0.000+0.000i +1.000+0.000i
+0.000+0.000i +0.000-0.000i +0.000+0.000i +0.000+0.000i +0.000+0.000i
+0.000+0.000i
+0.000+0.000i
+0.000+0.000i
+0.000+0.000i
B :
+2.0000 -1.0000i -6.0000 +6.0000i +7.0000 +8.0000i
+2.0000 -1.0000i -6.0000 +6.0000i +7.0000 +8.0000i
+2.0000 -1.0000i -1.0000 +2.0000i +6.0000 +5.0000i
+2.0000 -1.0000i -1.0000 +0.0000i +4.0000 +3.0000i
Press return to continue.
------------------------------------
Check if the columns of B are linearly independent
BT :
+2 -1i +2 -1i +2 -1i +2 -1i
-6 +6i -6 +6i -1 +2i -1 +0i
+7 +8i +7 +8i +6 +5i +4 +3i
BTb :
+2 -1i +2 -1i +2 -1i +2 -1i +0 +0i
-6 +6i -6 +6i -1 +2i -1 +0i +0 +0i
+7 +8i +7 +8i +6 +5i +4 +3i +0 +0i
gj_PP_mZ(BTb) :
+1.0000 +0.0000i +1.0000 +0.0000i +0.7257 -0.1150i +0.4602 -0.0973i
+0.0000 +0.0000i +0.0000 +0.0000i +1.0000 +0.0000i +0.8140 -0.3256i
+0.0000 +0.0000i +0.0000 +0.0000i +0.0000 +0.0000i +1.0000 +0.0000i
+0.0000 +0.0000i
+0.0000 +0.0000i
+0.0000 +0.0000i
Press return to continue.