Mathc complexes/c101c
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
---|
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = r_mZ( i_mZ(r+C2,r),999);
double **b = r_mZ( i_mZ(r+C2,C1),999);
double **Ab = i_Abr_Ac_bc_mZ(r+C2,r,C1);
c_A_b_Ab_mZ(A,b,Ab);
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), S1,P4, S1,P4,C3);
f_mZ(Ab);
f_mZ(b);
f_mZ(A);
}
/* ------------------------------------ */
int main(void)
{
time_t t;
srand(time(&t));
do
{
fun(rp_I(R3)+R1);
} while(stop_w());
return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
------------------------------------
A :
-899 +108i -301 -283i -453 +300i
+102 +734i +426 -935i +294 -659i
-531 +672i +898 -575i -473 -71i
+182 -441i +256 +122i -397 +710i
+168 -423i +590 -49i +680 +658i
b :
-353 -579i
+484 +372i
+862 -937i
-671 +682i
+390 +98i
Press return to continue.
------------------------------------
Copy/Past into the octave window.
Ab=[
-899+108*i,-301-283*i,-453+300*i,-353-579*i;
+102+734*i,+426-935*i,+294-659*i,+484+372*i;
-531+672*i,+898-575*i,-473-71*i,+862-937*i;
+182-441*i,+256+122*i,-397+710*i,-671+682*i;
+168-423*i,+590-49*i,+680+658*i,+390+98*i]
rref(Ab,.00000000001)
gj_mZ(Ab) :
Error : gj_mR();
The number of colums
must be superior or egal
to the number of rows
Press return to continue.
Exemple de sortie Octave :
>> Ab=[
-899+108*i,-301-283*i,-453+300*i,-353-579*i;
+102+734*i,+426-935*i,+294-659*i,+484+372*i;
-531+672*i,+898-575*i,-473-71*i,+862-937*i;
+182-441*i,+256+122*i,-397+710*i,-671+682*i;
+168-423*i,+590-49*i,+680+658*i,+390+98*i]
Ab =
-899 + 108i -301 - 283i -453 + 300i -353 - 579i
102 + 734i 426 - 935i 294 - 659i 484 + 372i
-531 + 672i 898 - 575i -473 - 71i 862 - 937i
182 - 441i 256 + 122i -397 + 710i -671 + 682i
168 - 423i 590 - 49i 680 + 658i 390 + 98i
>>
>> rref(Ab,.00000000001)
ans =
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
0 0 0 0
>>