Mathc matrices/Fichiers c : test02c

Un livre de Wikilivres.


Application


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


c00b.c
/* ------------------------------------ */
/*  Save as :   c00b.c                  */
/* ------------------------------------ */
#include "v_a.h"
/* ------------------------------------ */
void fun(void)
{
double a[R3*C3] ={ 1,2,3,
                   5,4,1,
                   7,2,5};
                        
double **A = ca_A_mR(a,i_mR(R3,C3));

  clrscrn();
  printf(" Copy/Past into the octave window.       \n\n");
  p_Octave_mR(A,"A", P0 );
  printf(" det(A)\n\n\n");

  printf(" det_R(A)  = %+.0f\n\n\n",det_R(A));
  
  stop();

  f_mR(A);  
}
/* ------------------------------------ */
int main(void)
{
  fun();

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




Exemple de sortie écran :
 -----------------------------------
 Copy/Past into the octave window.       

 A=[
+1,+2,+3;
+5,+4,+1;
+7,+2,+5]

 det(A)


 det_R(A)  = -72


 Press return to continue.