Mathc complexes/c101a
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define RA R4
#define CA C6
/* ------------------------------------ */
void fun(void)
{
int r = RA;
int c = CA;
double a[RA*(CA*C2)] ={
-180,+815, +439,-148, +755,+959, +130,-705, +195,-395, +525,+941,
-839, -97, +402,-586, +181,+311, +794,+666, +769,-689, +115,+394,
-711, +59, -927,+824, +471,+237, +705,+891, -225,+942, +660,-286,
-671,-765, -806, +95, +385,+909, +589,+516, +91,-651, -576,+119 };
double tb[RA*(C1*C2)] ={
+462,+974,
+388,-988,
+672,-844,
+69,+433 };
double **A = ca_A_mZ(a, i_mZ(r,c));
double **b = ca_A_mZ(tb, i_mZ(r,C1));
double **Ab = i_Abr_Ac_bc_mZ(r,r+C2,C1);
clrscrn();
printf(" A :");
p_mZ(A, S5,P0, S4,P0, C6);
printf(" b :");
p_mZ(b, S5,P0, S4,P0, C6);
printf(" Copy/Past into the octave window.\n\n");
p_Octave_mZ(c_A_b_Ab_mZ(A,b,Ab),"Ab",P0, P0);
printf(" rref(Ab,.00000000001)\n\n");
stop();
clrscrn();
printf(" gj_mZ(Ab) :");
p_mZ(gj_mZ(Ab), S8,P4, S8,P4, C3);
stop();
f_mZ(Ab);
f_mZ(b);
f_mZ(A);
}
/* ------------------------------------ */
int main(void)
{
fun();
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
A :
-180+815i +439-148i +755+959i +130-705i +195-395i +525+941i
-839 -97i +402-586i +181+311i +794+666i +769-689i +115+394i
-711 +59i -927+824i +471+237i +705+891i -225+942i +660-286i
-671-765i -806 +95i +385+909i +589+516i +91-651i -576+119i
b :
+462+974i
+388-988i
+672-844i
+69+433i
Copy/Past into the octave window.
Ab=[
-180+815*i,+439-148*i,+755+959*i,+130-705*i,+195-395*i,+525+941*i,+462+974*i;
-839-97*i,+402-586*i,+181+311*i,+794+666*i,+769-689*i,+115+394*i,+388-988*i;
-711+59*i,-927+824*i,+471+237*i,+705+891*i,-225+942*i,+660-286*i,+672-844*i;
-671-765*i,-806+95*i,+385+909*i,+589+516*i,+91-651*i,-576+119*i,+69+433*i]
rref(Ab,.00000000001)
Press return to continue.
gj_mZ(Ab) :
+1.0000 +0.0000i -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 +1.0000 -0.0000i
+0.0000 +0.0000i -0.0000 +0.0000i +0.0000 +0.0000i
+0.0000 +0.0000i +0.9166 +0.2968i +0.2005 -1.2657i
+0.0000 +0.0000i +0.8802 -0.0597i -0.1948 +0.1861i
+0.0000 +0.0000i +0.0832 -0.3955i +0.3289 -0.0106i
+1.0000 +0.0000i +0.9234 -0.4792i -0.3506 -0.8870i
-0.5132 -0.3781i
+0.2813 -0.0885i
+0.8630 -0.0679i
-1.0555 -0.8914i
Press return to continue.