Aller au contenu

Mathc matrices/c101a

Un livre de Wikilivres.


Application

Installer et compiler ces fichiers dans votre répertoire de travail.

c00c.c
/* ------------------------------------ */
/*  Save as:   c00c.c                   */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
#define   Cb C1
/* ------------------------------------ */
void fun(int r)
{
double **Ab = r_singular_Ab_mR( i_Abr_Ac_bc_mR(r,r,Cb),999);

  clrscrn();
  printf("                  The system is consistent             \n\n"
         " Ab:              Rows of identical A's, with identical b's"); 
  p_mR(Ab, S8,P0,C7);
  stop();

  clrscrn();
  printf(" Copy/Paste into the octave window.\n\n");
  p_Octave_mR(Ab,"Ab",P0);
  printf("\n rref(Ab,.00000000001)\n\n");

  printf(" Ab:              The system is consistent");  
  p_mR(gj_PP_mR(Ab,YES), S10,P4,C7);
  
  is_system_consistent_mR(Ab);

  f_mR(Ab);
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));
do
{
  fun(rp_I(R5)+R1);


} while(stop_w());

  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */
Exemple de sortie écran :
                  The system is consistent             

 Ab:              Rows of identical A's, with identical b's
     -29     +258     -688     -700     +891 
    +800     -939     -532     -511     -595 
     -29     +258     -688     -700     +891 
    +499     +251     +323     -938     +504 

 Press return to continue. 


 Copy/Paste into the octave window.

 Ab=[
-29,+258,-688,-700,+891;
+800,-939,-532,-511,-595;
-29,+258,-688,-700,+891;
+499,+251,+323,-938,+504]


 rref(Ab,.00000000001)

 Ab:              The system is consistent
   +1.0000    +0.0000    +0.0000    -1.6663    +0.6664 
   +0.0000    +1.0000    +0.0000    -1.2303    +1.6092 
   -0.0000    -0.0000    +1.0000    +0.6263    -0.7197 
   +0.0000    +0.0000    +0.0000    +0.0000    +0.0000 


 Press   return to continue
 Press X return to stop