Mathc matrices/e1505
Étude du code
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : gj05.c */
/* ------------------------------------ */
double **xx_sort_r_mR(
double **Ab
double pivot;
int c;
int r;
int r_pivot = R1;
clrscrn(); 
printf(" Ab : Before the function sort_r_mR(); \n");
p_mR(Ab,S8,P4,C6);
stop();
clrscrn(); 
 for ( c=C1; c<Ab[C_SIZE_A][C0]; c++)
 r = r_pivot;
 pivot = 0.;
 while( (pivot<ERROR_E) && r<Ab[R_SIZE][C0] )
 pivot = fabs( Ab[r][c] );
clrscrn(); 
printf("/* --------- DEBUG 1 ---------- */\n\n"); 
printf(" Ab : pivot[%d][%d] = %f \n",r,c,pivot);
p_mR(Ab,S8,P4,C8);
 if(pivot>ERROR_E) 
 swapR_mR(Ab, r, r_pivot);
 r_pivot++;
printf(" Ab");
p_mR(Ab,S8,P4,C8);
stop();
clrscrn(); 
/* --------- DEBUG 1 ---------- */
 r++;
 return(Ab);
/* ------------------------------------ */
double **XX_gj_TP_mR(
double **Ab
 gj1_T_mR(Ab); 
 sort_c_mR(Ab);
 xx_sort_r_mR(Ab);
return(Ab);
/* ------------------------------------ */
void fun(int r)
double **A = i_mR(r,r);
double **b = i_mR(r,C1);
double **Ab = i_Abr_Ac_bc_mR(r,r,C1);
/* i_Abr_Ac_bc_mR(R_Ab,C_A,C_b)); */
 do
 r_mR(A,999.);
 printf(".");
 }while(!det_R(A));
 r_mR(b,999.);
 c_A_b_Ab_mR(A,b,Ab);
 clrscrn();
 printf(" Copy/Past into the octave window.\n\n");
 p_Octave_mR(Ab,"Ab",P0);
 printf("\n rref(Ab.00000000001)\n\n");
 stop();
 clrscrn();
 XX_gj_TP_mR(Ab);
 printf(" gj_TP_mR(Ab) :\n");
 p_mR(Ab,S10,P4,C7);