Aller au contenu

Mathc gnuplot/001p

Un livre de Wikilivres.


Sommaire


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

c00d.c
/* --------------------------------- */
/* save as  c00d.c                   */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fd.h"
/* --------------------------------- */
int main(void)
{
CTRL_G w;
CTRL_H h;

  w.xmin =  -2.; w.xmax = 15.;
  w.ymin = -15.; w.ymax =  1.;
           	
  h.tmin =  -2.; h.tmax = 15.; h.step = 0.001;

 clrscrn();
 printf(" H : if(t>0) 1 else 0 \n\n"
        " Y : t-> %s       \n\n\n\n",Yeq);

   G_H(w,h,Y);
   
 printf(" To see the graph"
        " ... load \"a_main.plt\" ... with gnuplot.\n\n\n");
 stop();

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


Exemple de sortie écran :
 H : if(t>0) 1 else 0 

 Y : t-> Sum(-H(t-n),n=0..15)       



 To see the graph ... load "a_main.plt" ... with gnuplot.


 Press return to continue.