Mathc complexes/c101j
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **Ab = r_singular_Ab_mZ( i_Abr_Ac_bc_mZ(r,r,C1),999);
double **A = c_Ab_A_mZ(Ab, i_mZ(r,r));
double **b = c_Ab_b_mZ(Ab, i_mZ(r,C1));
clrscrn();
printf(" A :");
p_mZ(A, S5,P0, S4,P0, C6);
printf(" b :");
p_mZ(b, S5,P0, S4,P0, C6);
stop();
clrscrn();
printf(" Copy/Past into the octave window.\n\n");
p_Octave_mZ(Ab,"Ab",P0, P0);
printf(" rref(Ab,.00000000001)\n\n");
printf(" gj_mZ(Ab) :");
p_mZ(gj_mZ(Ab),S9,P4,S9,P4,C4);
f_mZ(Ab);
f_mZ(b);
f_mZ(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R3)+R2);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
C'est le même fichier que le précédent mais cette fois la matrice Ab à plusieurs lignes identiques.
Exemple de sortie écran :
------------------------------------
A :
+162-245i -993+685i -456-582i -579+692i
+162-245i -993+685i -456-582i -579+692i
+162-245i -993+685i -456-582i -579+692i
+126-208i +829-134i +635-491i +783+783i
b :
-538+183i
-538+183i
-538+183i
+531-347i
Press return to continue.
------------------------------------
Copy/Past into the octave window.
Ab=[
+162-245*i,-993+685*i,-456-582*i,-579+692*i,-538+183*i;
+162-245*i,-993+685*i,-456-582*i,-579+692*i,-538+183*i;
+162-245*i,-993+685*i,-456-582*i,-579+692*i,-538+183*i;
+126-208*i,+829-134*i,+635-491*i,+783+783*i,+531-347*i]
rref(Ab,.00000000001)
gj4_mZ(Ab) :
+1.0000 +0.0000i +0.0000 +0.0000i +2.4799 -0.7154i -1.3962 +2.0168i
+0.0000 +0.0000i +1.0000 +0.0000i +0.5323 +0.2247i +0.5888 +0.3828i
+0.0000 +0.0000i +0.0000 +0.0000i +0.0000 +0.0000i +0.0000 +0.0000i
+0.0000 +0.0000i +0.0000 +0.0000i +0.0000 +0.0000i +0.0000 +0.0000i
+0.8715 -0.3964i
+0.6140 -0.0404i
+0.0000 +0.0000i
+0.0000 +0.0000i
Press return to continue
Press X to stop