Mathc complexes/c103a
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
#define RCA RC3
#define Cb C1
/* ------------------------------------ */
void fun(void)
{
double a[RCA*(RCA*C2)] ={ 1,2, 3,4, 5,6,
5,4, 1,3, 6,8,
7,2, 5,1, 1,1};
double tb[RCA*(Cb*C2)] ={ 1,4,
2,5,
3,6};
double **A = ca_A_mZ(a, i_mZ(RCA,RCA));
double **b = ca_A_mZ(tb, i_mZ(RCA,Cb));
double **Ab = c_A_b_Ab_mZ(A,b, i_Abr_Ac_bc_mZ(RCA,RCA,Cb));
clrscrn();
printf(" A :");
p_mZ(A, S4,P0, S3,P0, C5);
printf(" b :");
p_mZ(b, S4,P0, S3,P0, C5);
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), S5,P4, S9,P4, C3);
stop();
f_mZ(Ab);
f_mZ(b);
f_mZ(A);
}
/* ------------------------------------ */
int main(void)
{
fun();
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
.
Exemple de sortie écran :
------------------------------------
A :
+1 +2i +3 +4i +5 +6i
+5 +4i +1 +3i +6 +8i
+7 +2i +5 +1i +1 +1i
b :
+1 +4i
+2 +5i
+3 +6i
Press return to continue.
------------------------------------
Copy/Past into the octave window.
Ab=[
+1+2*i,+3+4*i,+5+6*i,+1+4*i;
+5+4*i,+1+3*i,+6+8*i,+2+5*i;
+7+2*i,+5+1*i,+1+1*i,+3+6*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.30851 +0.36905i
+0.32627 +0.49451i
+0.22124 -0.22043i
Press return to continue.