Aller au contenu

Mathc complexes/h09b

Un livre de Wikilivres.

Application


Installer et compiler ce fichier dans votre répertoire de travail.

c00a.c
/* ------------------------------------ */
/*  Save as :   c01a.c                  */
/* ------------------------------------ */

/* ------------------------------------ */
#include "w_a.h"
/* ------------------------------------ */
void fun(int r)
{
double **A = r_mZ(i_mZ(r,r),9);

  clrscrn();
  printf(" octave give a bad result.                 \n");
  printf(" If you past this type of numbers +1 -2*i  \n");
  printf(" instead of this type (see space)  +1-2*i\n\n");
  printf(" Copy/Past into the octave window.       \n\n");
  p_Octave_mZ(A,"A",P0 ,P0);
  printf(" det(A)\n\n\n");

  f_mZ(A);  
}
/* ------------------------------------ */
int main(void)
{
time_t t;

  srand(time(&t));

do
{
  fun(rp_I(R3)+R2);
} while(stop_w());

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


Exemple de sortie écran :

     

 octave give a bad result.                 
 If you past this type of numbers +1 -2*i  
 instead of this type (see space)  +1-2*i


 Copy/Past into the octave window.  


 A=[
-4-9*i,+6+8*i,-5+1*i,+5+1*i,+3-7*i;
-8+2*i,-4+6*i,-7+6*i,-7-7*i,-2+3*i;
+2-6*i,+3-7*i,+5+3*i,-2+3*i,+3-7*i;
+2-8*i,+5-6*i,-7+8*i,+9-5*i,-5+2*i;
-5+8*i,+8+8*i,+4+7*i,-4+2*i,+7-3*i]

 det(A)



 Press return to continue
 Press X      to stop