Mathc complexes/h10g
Bibliothèque
Installer ce fichier dans votre répertoire de travail.
/* Save as : wgj1.h */
void g_T_mZ(
double **Ab
int r = R1;
int c = C1;
 while((r<Ab[R_SIZE][C0]) &&
 (c<Ab[C_SIZE_A][C0])
 {
 if(pivotbestAb_mZ(Ab,r,c)>ERROR_E) 
 zero_under_pivot_gjAb_mZ(Ab,r,c);
 r++;
 c+=C2;
 r--;
 c-=C2;
 while( (r>R1) )
 zero_below_pivot_gj_mZ(Ab,r,c);
 r--;
 c-=C2;
void gj1_mZ(
double **Ab
 g_T_mZ(Ab);
 sort_c_mZ(Ab);
 sort_r_mZ(Ab);
/* ------------------------------------ */
 Déclaration des fichiers h.

Mathc complexes/h10h
Bibliothèque
Installer ce fichier dans votre répertoire de travail.
/* Save as : wgj4.h */
void gj4_T_mZ(
double **Ab
int r = R1;
int c = C1;
 while((r<Ab[R_SIZE][C0]) &&
 (c<Ab[C_SIZE_A][C0])
 {
 if(pivotbest4Ab_r0_mZ(Ab,r,c)>ERROR_E) 
 zero_under_pivot_gjAb_mZ(Ab,r,c);
 r++;
 c+=C2;
void gj4_mZ(
double **Ab
double **Ab_T = c_mZ(Ab,i_AbR_AbC_AC_mZ(
 Ab[R_SIZE][C0],
 Ab[C_SIZE][C0],
 Ab[C_SIZE_A][C0]));
double **new_Ab;
int r_not_0;
 gj4_T_mZ(Ab_T);
 sort4_r_coef_r0_mZ(Ab_T);
 r_not_0 = is_system_consistent_mZ(Ab,Ab_T);
 if(r_not_0>2)
 new_Ab = i_AbR_AbC_AC_mZ(
 r_not_0,
 Ab[C_SIZE][C0],
 Ab[C_SIZE_A][C0]);
 c_nr_mZ(Ab,r_not_0,new_Ab);
 gj2_mZ(new_Ab);
 m0_mZ(Ab);
 c_mZ(new_Ab,Ab);
 f_mZ(new_Ab);
 else printf(" The system has only an equation !!\n\n");
f_mZ(Ab_T);
/* ------------------------------------ */
 Déclaration des fichiers h.

Mathc complexes/h10k
Bibliothèque
Installer ce fichier dans votre répertoire de travail.
/* Save as : wgj2.h */
void gj2_T_mZ(
double **Ab
int r = R1;
int c = C1;
 while((r<Ab[R_SIZE][C0]) &&
 (c<Ab[C_SIZE_A][C0])
 {
 if(pivotbest2Ab_mZ(Ab,r,c)>ERROR_E) 
 zero_under_pivot_gjAb_mZ(Ab,r,c);
 r++;
 c+=C2;
 r--;
 c-=C2;
 while( (r>R1) )
 zero_below_pivot_gj_mZ(Ab,r,c);
 r--;
 c-=C2;
void gj2_mZ(
double **Ab
 gj2_T_mZ(Ab);
 sort_c_mZ(Ab);
 sort_r_mZ(Ab);
/* ------------------------------------ */
 Déclaration des fichiers h.

Mathc complexes/h10i
Bibliothèque 
Installer ce fichier dans votre répertoire de travail.
/* Save as : wgj.h */
double **gj_mZ(
double **Ab
double **A;
nb_Z det;
double r_T = (((Ab[R_SIZE][C0]-C1)*C2)+C1);
 if( r_T == Ab[C_SIZE_A][C0])
 A = i_RC_mZ(Ab[R_SIZE][C0],Ab[C_SIZE_A][C0]);
 c_Ab_A_mZ(Ab,A);
 det=det_Z(A);
 if(det.r && det.i) gj1_mZ(Ab);
 else gj4_mZ(Ab);
 f_mZ(A);
 else if( r_T < Ab[C_SIZE_A][C0])
 A = i_RC_mZ(Ab[R_SIZE][C0],(((Ab[R_SIZE][C0]-C1)*C2)+C1));
 c_Ab_subArxr_mZ(Ab,A);
 det=det_Z(A);
 if(det.r && det.i) gj2_mZ(Ab);
 else gj4_mZ(Ab);
 f_mZ(A);
 else if( r_T > Ab[C_SIZE_A][C0])
 {
 printf("\n Error : gj_mR();\n");
 printf("\n The number of colums\n");
 printf("\n must be superior or egal\n");
 printf("\n to the number of rows\n");
 printf("\n Press return to continue.\n");
 fflush(stdout);
 getchar();
 exit(EXIT_FAILURE);

return(Ab);
/* ------------------------------------ */
 Déclaration des fichiers h.

Mathc complexes/c101a
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c00.c */
/* ------------------------------------ */
/* ------------------------------------ */
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(r_mZ(b,999.), 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) :");
 gj1_mZ(Ab);
 p_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 :
 +479-154i 
 -501+992i 
 -763-591i 
 -843+708i 
 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,+479-154*i;
-839-97*i,+402-586*i,+181+311*i,+794+666*i,+769-689*i,+115+394*i,-501+992*i;
-711+59*i,-927+824*i,+471+237*i,+705+891*i,-225+942*i,+660-286*i,-763-591*i;
-671-765*i,-806+95*i,+385+909*i,+589+516*i,+91-651*i,-576+119*i,-843+708*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 
 -1.2843 -0.6782i 
 -0.4263 +0.3803i 
 -0.5174 +0.2718i 
 -1.0200 +0.8650i 
 Press return to continue.

Mathc complexes/c102a
Application 
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c00a.c */
void fun(int r)
double **A = i_mZ(r,r);
double **b = r_mZ(i_mZ(r,C1),999.);
double **X = i_mZ(r,C1);
double **T = i_mZ(r,C1);
double **Ab = i_Abr_Ac_bc_mZ(r,r,C1);
 do
 r_mZ(A,999.);
 printf(".");
 }while(!det_Z(A).r);
 c_A_b_Ab_mZ(A,b,Ab);
 clrscrn();
 printf(" We want to find X such as, \n\n");
 printf(" AX = b \n\n");
 printf(" We can use the function, \n");
 printf(" gaussjordan : gj_mZ(Ab); \n\n");
 printf(" To verify the result you can \n");
 printf(" multiply the matrix A by X. \n");
 printf(" You must refind b. \n\n\n");
 stop();
 clrscrn();
 printf(" A :");
 p_mZ(A, S5,P0, S4,P0, C6);
 printf(" b :");
 p_mZ(b, S5,P0, S4,P0, C6);
 stop();
 clrscrn();
 printf(" Ab :");
 p_mZ(Ab, S5,P0, S4,P0, C6);
 printf(" gj1_mZ(Ab) :");
 gj_mZ(Ab);
 p_mZ(Ab, S1,P4, S1,P4, C3);
 stop();
 clrscrn();
 printf(" gj1_mZ(Ab) :");
 p_mZ(Ab, S4,P3, S4,P3, C4);
 printf(" X :");
 p_mZ(c_Ab_b_mZ(Ab,X), S4,P3, S4,P3, C4);
 stop();
 clrscrn();
 printf(" b :");
 p_mZ(b, S4,P0, S4,P0, C7);
 printf(" AX :");
 p_mZ(mul_mZ(A,X,T), S4,P0, S4,P0, C7);
 f_mZ(Ab);
 f_mZ(T);
 f_mZ(X);
 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;
/* ------------------------------------ */