< Mathc complexes
Installer et compiler ces fichiers dans votre répertoire de travail.
gj_z2.c ' |
---|
/* ------------------------------------ */
/* Save as : gj_z2.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = r_mZ(i_mZ(r,r+C2),999);
double **b = i_mZ(r, C1);
double **Ab = i_AbR0_mZ(r,r+C2,C1);
/* i_AbR0_mZ(R_Ab,C_A,C_b));*/
clrscrn();
printf(" A :");
p_mZ(A,5,0,5,0,5);
printf(" b :");
p_mZ(r_mZ(b,999.),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(4)+1);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
------------------------------------
A :
+270 +706i +690 -69i +402 -59i +894 -285i +518 +566i
+884 -789i +334 -21i +460 +230i +356 -29i +854 +460i
+246 +20i -637 +516i -445 +46i +584 +846i -105 -197i
+698 +436i +480 -583i +226 +532i +322 -685i -761 -677i
-69 +892i -737 -33i +630 -93i +548 -75i -139 +850i
-11 -639i -955 +620i
+628 -453i -755 -957i
+850 -341i -481 +860i
-433 -615i -137 -779i
+640 -961i -47 -209i
b :
-21 -527i
-69 -719i
-963 -267i
-21 -907i
-799 +342i
Press return to continue.
------------------------------------
Copy/Past into the octave window.
Ab=[
+270+706*i,+690-69*i,+402-59*i,+894-285*i,+518+566*i,-11-639*i,-955+620*i,-21-527*i;
+884-789*i,+334-21*i,+460+230*i,+356-29*i,+854+460*i,+628-453*i,-755-957*i,-69-719*i;
+246+20*i,-637+516*i,-445+46*i,+584+846*i,-105-197*i,+850-341*i,-481+860*i,-963-267*i;
+698+436*i,+480-583*i,+226+532*i,+322-685*i,-761-677*i,-433-615*i,-137-779*i,-21-907*i;
-69+892*i,-737-33*i,+630-93*i,+548-75*i,-139+850*i,+640-961*i,-47-209*i,-799+342*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.00000+0.00000i +0.00000+0.00000i -0.00000+0.00000i
+0.00000+0.00000i +0.00000+0.00000i -0.14593-0.12119i
+0.00000+0.00000i +0.00000+0.00000i -0.72900+0.38452i
+0.00000+0.00000i +0.00000+0.00000i +0.03760-1.37079i
+1.00000-0.00000i +0.00000-0.00000i +0.24003-0.62803i
+0.00000+0.00000i +1.00000-0.00000i +0.74575-0.11163i
-0.80845-0.35808i -0.05367-0.69092i
-1.33991+0.13247i +0.79683-0.74139i
-2.40296-2.89513i +0.48046-0.87869i
-0.56030+1.98871i -1.37505-0.17611i
+1.05794-0.79291i +0.52306+0.22212i
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.