Aller au contenu

Mathc matrices/04b

Un livre de Wikilivres.


Application

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

c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */     
#define RCA          RC3  
/* ------------------------------------ */ 
void fun(void)
{                          
double d[RCA*RCA] ={   
  +1, +0,   +0,      
  +0, +2,   +0,       
  +0, +0,   +3   
};

double **D      =         ca_A_mR(d, i_mR(RCA,RCA));                       
double **A      = rdefpos_diag_mR(D, i_mR(RCA,RCA),99);

  clrscrn(); 
  printf(" A : Choose your Eigns Values,"
         " and copy these lines into your C file");
  P_mR(A, S8,P12, C4);     
    
  printf(" D = EValue :");
  p_mR(D, S8,P2, C4);
              
  f_mR(A);
  f_mR(D);
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));

do
{
 fun();

} while(stop_w());

  return 0;
}
/* ------------------------------------ */
/* ------------------------------------ */


'Choisir les valeurs propres :'

Exemple de sortie écran :

 A : Choose your Eigns Values, and copy these lines into your C file
+2.210333368648, +0.143493589514, -0.479053581306, 
+0.143493589514, +1.867084911061, -0.846148442989, 
-0.479053581306, -0.846148442989, +1.922581720291  

 D = EValue :
   +1.00    +0.00    +0.00 
   +0.00    +2.00    +0.00 
   +0.00    +0.00    +3.00 


 Press   return to continue
 Press X return to stop