< Mathc complexes
C'est le même fichier que le précédent mais cette fois ci la matrice Ab à trois lignes identiques.
![]() |
gj2_zsing.c ' |
---|
/* ------------------------------------ */
/* Save as : gj2_zsing.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
/* i_AbR0_mZ(R_Ab,C_A,C_b));*/
double **Ab = r_singular_Ab_mZ(i_AbR0_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,5,0,5,0,5);
printf(" b :");
p_mZ(b,5,0,5,0,5);
stop();
clrscrn();
printf(" Copy/Past into the octave window.\n\n");
p_octave_mZ(c_A_b_Ab_mZ(A,b,Ab),"Ab",1,0, 0);
printf(" rref(Ab,.00000000001)\n\n");
printf(" gj_mZ(Ab) :");
p_mZ(gj_mZ(Ab),1,5,1,5,3);
f_mZ(Ab);
f_mZ(b);
f_mZ(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(3)+1);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
C'est le même fichier que le précédent mais cette fois la matrice Ab à deux lignes identiques.
Exemple de sortie écran :
------------------------------------
A :
+950 +428i -499 -347i +720 +686i +440 +112i
-799 -359i -811 -625i +986 +728i -137 +244i
-493 -59i -755 +622i +588 +944i +818 -59i
-799 -359i -811 -625i +986 +728i -137 +244i
b :
+140 +652i
-301 +230i
-83 -461i
-301 +230i
Press return to continue.
------------------------------------
Copy/Past into the octave window.
Ab=[
+950+428*i,-499-347*i,+720+686*i,+440+112*i,+140+652*i;
-799-359*i,-811-625*i,+986+728*i,-137+244*i,-301+230*i;
-493-59*i,-755+622*i,+588+944*i,+818-59*i,-83-461*i;
-799-359*i,-811-625*i,+986+728*i,-137+244*i,-301+230*i]
rref(Ab,.00000000001)
gj_mZ(Ab) :
+1.00000-0.00000i +0.00000+0.00000i +0.00000+0.00000i
+0.00000-0.00000i +1.00000-0.00000i +0.00000-0.00000i
-0.00000+0.00000i -0.00000-0.00000i +1.00000+0.00000i
+0.00000+0.00000i +0.00000+0.00000i +0.00000+0.00000i
+0.25438-0.08547i +0.38469+0.21563i
-0.36070-0.60189i -0.56242-0.12470i
-0.09788-0.38061i -0.25233+0.27530i
+0.00000+0.00000i +0.00000+0.00000i
Press return to continue
Press X to stop
Cet article est issu de Wikibooks. Le texte est sous licence Creative Commons - Attribution - Partage dans les Mêmes. Des conditions supplémentaires peuvent s'appliquer aux fichiers multimédias.