Mathc initiation/Fichiers h : c41fb

Un livre de Wikilivres.


Sommaire


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

c00b1.c
/* --------------------------------- */
/* save as  c00b1.c                  */
/* --------------------------------- */
#include  "x_hfile.h"
#include       "fb.h"
/* --------------------------------- */
int main(void)
{
CTRL_splot w;

w.xmin = -8.0; w.xmax = +8.0;
w.ymin = -4.0; w.ymax = +4.0;

double     x = -3.5;
double cstep =  0.1;

 clrscrn();

 printf(" open the file \"a_main.plt\" with Gnuplot.\n\n"
        " Use the command replot of gnuplot         \n\n");

 for(;(x+=.03)<3.5;)
    {

   circle(1./K_y_2d(f,x),
          h_y_2d(f,x),
          k_y_2d(f,x),
          cstep);

   G_C_2d(w,
          f,x,
          feq
          );

          pause(9.E7);
    }

 return 0;
}
/* --------------------------------- */
/* --------------------------------- */
Calculer la courbure pour une fonction cos(x) en langage c gnuplot
Exemple de sortie écran :
 Open the file "a_main.plt" with Gnuplot.

 Press return to continue.