Mathc matrices/a123
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c02c.c */
int main(void)
time_t t;
 srand(time(&t));
double ta[R3*C4]={ 1,0,0, 16,
 0,1,0, 27,
 0,0,1, 25};
double **T = ca_A_mR(ta,i_mR(R3,C4));
double **A = r_mR(i_mR(R3,C3),9); 
double **AT = mul_mR(A,T,i_mR(R3,C4)); 
double **Ab = gj_TP_mR(c_mR(AT,i_Abr_Ac_bc_mR(R3,C3,C1))); 
 printf(" You want to create this nonlinear system of equations :\n");
 printf("\n");
 printf(" a X**4 + b Y**3 + c Z**2 = d \n");
 printf(" e X**4 + f Y**3 + g Z**2 = h \n");
 printf(" i X**4 + j Y**3 + k Z**2 = l \n");
 printf("\n");
 printf(" With X = 2, Y = 3, Z = 5 \n");
 printf(" You have X**4 = 16, Y**3 = 27, Z**2 = 25 \n");
 printf("\n");
 printf(" In fact, you want to find a matrix, \n");
 printf(" which has this reduced row-echelon form :\n\n" 
 "Ab:");
 p_mR(T,S7,P3,C6);
 stop(); 
 clrscrn(); 
 printf(" If :\n\n A = r_mR(i_mR(R3,C3),9); ");
 p_mR(A,S7,P3,C6); 
 printf(" And :\n\n T :");
 p_mR(T,S7,P3,C6); 
 printf(" I suggest this matrix : A*T = Ab\n\n" 
 " Ab : ");
 P_mR(AT,S8,P3,C6);
 stop(); 
 clrscrn(); 
 printf("\n With the Gauss Jordan function :\n"
 "Ab:");
 p_mR(Ab,S7,P3,C6);
 stop();
 f_mR(Ab);
 f_mR(A);
 f_mR(T);
 f_mR(AT);
 return 0;
/* ------------------------------------ */
Le but de ce travail est de créer des systèmes dont on connait le résultat par avance.
 Exemple de sortie écran :
 You want to create this nonlinear system of equations :
 a X**4 + b Y**3 + c Z**2 = d 
 e X**4 + f Y**3 + g Z**2 = h 
 i X**4 + j Y**3 + k Z**2 = l 
 With X = 2, Y = 3, Z = 5 
 You have X**4 = 16, Y**3 = 27, Z**2 = 25 
 In fact, you want to find a matrix, 
 which has this reduced row-echelon form :
Ab:
 +1.000 +0.000 +0.000 +16.000 
 +0.000 +1.000 +0.000 +27.000 
 +0.000 +0.000 +1.000 +25.000 
 Press return to continue. 
 ------------------------
 If :
 A = r_mR(i_mR(R3,C3),9); 
 +6.000 +2.000 +4.000 
 -4.000 -4.000 -8.000 
 -2.000 -5.000 -9.000 
 And :
 T :
 +1.000 +0.000 +0.000 +16.000 
 +0.000 +1.000 +0.000 +27.000 
 +0.000 +0.000 +1.000 +25.000 
 I suggest this matrix : A*T = Ab
 Ab : 
 +6.000, +2.000, +4.000, +250.000, 
 -4.000, -4.000, -8.000, -372.000, 
 -2.000, -5.000, -9.000, -392.000 
 Press return to continue. 
 ------------------------
 With the Gauss Jordan function :
Ab:
 +1.000 +0.000 +0.000 +16.000 
 +0.000 +1.000 +0.000 +27.000 
 +0.000 +0.000 +1.000 +25.000 
 Press return to continue.

Mathc matrices/a124
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c00a.c */
int main(void)
double ab[RA*(CA+Cb)]={
 +4.000, -2.000, -7.000, -165.000, 
 +9.000, -4.000, -2.000, -14.000, 
 +1.000, +6.000, +9.000, +403.000 
double **Ab = ca_A_mR(ab,i_Abr_Ac_bc_mR(RA,CA,Cb));
double **A = c_Ab_A_mR(Ab,i_mR(RA,CA));
double **b = c_Ab_b_mR(Ab,i_mR(RA,Cb));
 clrscrn();
 printf(" You have this nonlinear system of equations :\n\n");
 printf(" a x**4 + b y**3 + c z**2 = d \n");
 printf(" e x**4 + f y**3 + g z**2 = h \n");
 printf(" i x**4 + j y**3 + k z**2 = l \n\n");
 printf(" We write X = x**4; Y = y**3; Z = z**2;\n\n"); 
 printf(" a X + b Y + c Z = d\n");
 printf(" e X + f Y + g Z = h\n");
 printf(" i X + j Y + k Z = l\n\n"); 
 printf(" Ab :\n"); 
 printf(" a b c d\n");
 printf(" e f g h\n");
 printf(" i j k l\n\n\n"); 
 stop(); 
 clrscrn();
 printf(" With A :");
 p_mR(A,S8,P4,C7);
 printf(" And b :");
 p_mR(b,S8,P4,C7);
 printf(" Ab :");
 p_mR(Ab,S8,P4,C7);
 getchar();
 clrscrn();
 printf(" Copy/Past into the octave window.\n\n");
 p_Octave_mR(Ab,"Ab",P4);
 printf("\n rref(Ab.00000000001)\n\n");
 printf(" gj_TP_mR(Ab) :");
 gj_TP_mR(Ab);
 p_mR(Ab,S10,P4,C7);
 printf(" You have x**4 = 16, y**3 = 27, z**2 = 25 \n\n");
 printf(" These give x = 2, y = 3, z = 5 \n\n\n");
 stop();
 f_mR(Ab);
 f_mR(b);
 f_mR(A);
 return 0;
/* ------------------------------------ */

Exemple de sortie écran :
 You have this nonlinear system of equations :
 a x**4 + b y**3 + c z**2 = d 
 e x**4 + f y**3 + g z**2 = h 
 i x**4 + j y**3 + k z**2 = l 
 We write X = x**4; Y = y**3; Z = z**2;
 a X + b Y + c Z = d
 e X + f Y + g Z = h
 i X + j Y + k Z = l
 Ab :
 a b c d
 e f g h
 i j k l
 Press return to continue. 
 ------------------------------------ 
 With A :
 +4.0000 -2.0000 -7.0000 
 +9.0000 -4.0000 -2.0000 
 +1.0000 +6.0000 +9.0000 
 And b :
-165.0000 
-14.0000 
+403.0000 
 Ab :
 +4.0000 -2.0000 -7.0000 -165.0000 
 +9.0000 -4.0000 -2.0000 -14.0000 
 +1.0000 +6.0000 +9.0000 +403.0000 
 ------------------------------------ 
 Copy/Past into the octave window.
 Ab=[
+4.0000,-2.0000,-7.0000,-165.0000;
+9.0000,-4.0000,-2.0000,-14.0000;
+1.0000,+6.0000,+9.0000,+403.0000]
 rref(Ab.00000000001)
 gj_TP_mR(Ab) :
 +1.0000 +0.0000 +0.0000 +16.0000 
 +0.0000 +1.0000 +0.0000 +27.0000 
 +0.0000 +0.0000 +1.0000 +25.0000 
 You have x**4 = 16, y**3 = 27, z**2 = 25 
 These give x = 2, y = 3, z = 5 
 Press return to continue.

Systèmes sensoriels/Oiseaux
Mathc complexes/a189
Application 
Installer et compiler ces fichiers dans votre répertoire de travail.
/* Save as : c00a.c */
int main(void)
double a[RA*(CA*C2)] = { 1,2, 3,4, 5,6,
 5,4, 1,3, 6,8,
 7,2, 5,1, 1,1};
double b0[RA*(Cb*C2)] ={ 1,4, 
 2,5, 
 3,6}; 
double **A = ca_A_mZ(a, i_mZ(RA,CA)); 
double **b = ca_A_mZ(b0,i_mZ(RA,Cb)); 
double **X = i_mZ(RA,Cb);
double **T = i_mZ(RA,Cb);
double **Ab = i_Abr_Ac_bc_mZ(RA,CA,Cb);
 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, S8,P4, S8,P4, C3);
 stop();
 clrscrn();
 printf(" gj1_mZ(Ab) :");
 p_mZ(Ab, S10,P3, S4,P3, C4);
 printf(" X :");
 p_mZ(c_Ab_b_mZ(Ab,X), S10,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);
 stop();
 return 0;
/* ------------------------------------ */

Exemple de sortie écran :
 We want to find X such as, 
 AX = b 
 We can use the function, 
 gaussjordan : gj_mZ(Ab); 
 To verify the result you can 
 multiply the matrix A by X. 
 You must refind b. 
 Press return to continue. 
 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. 
 Ab :
 +1 +2i +3 +4i +5 +6i +1 +4i 
 +5 +4i +1 +3i +6 +8i +2 +5i 
 +7 +2i +5 +1i +1 +1i +3 +6i 
 gj1_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.3085 +0.3691i 
 +0.3263 +0.4945i 
 +0.2212 -0.2204i 
 Press return to continue. 
 gj1_mZ(Ab) :
 +1.000+0.000i +0.000-0.000i +0.000+0.000i +0.309+0.369i 
 +0.000+0.000i +1.000+0.000i +0.000+0.000i +0.326+0.495i 
 +0.000+0.000i +0.000+0.000i +1.000+0.000i +0.221-0.220i 
 X :
 +0.309+0.369i 
 +0.326+0.495i 
 +0.221-0.220i 
 Press return to continue. 
 ------------------------------------ 
 b :
 +1 +4i 
 +2 +5i 
 +3 +6i 
 AX :
 +1 +4i 
 +2 +5i 
 +3 +6i 
 Press return to continue.