Sommaire


Installer ce fichier dans votre répertoire de travail.

g_tanpx.h
/* ---------------------------------- */
/* save as g_tanpx.h                  */
/* ---------------------------------- */
void G_TanPx(
CTRL_splot w,
double   c,
double (*P_f)(double x),
  char   feq[],
double (*PDf)(double x)
)
{
double  a =  (*PDf)(c);
double  b = (-(*PDf)(c)* c + (*P_f)(c));

FILE   *fp = fopen("a_main.plt","w");
        
fprintf(fp," set zeroaxis lt 8\n"
           " set grid\n\n"
//           " set size ratio -1\n"
           " plot [%0.3f:%0.3f] [%0.3f:%0.3f]\\\n"
           " %s             with line   lt 6 lw 2,\\\n"
           " %0.6f*x %+0.6f with line   lt 6 lw 2,\\\n" 
           " \"a_p2xaxi\"   with linesp lt 7 lw 4 ps 2  \\\n",
             w.xmin,w.xmax,w.ymin,w.ymax,
             feq,
             a,b);
 fclose(fp);

         fp = fopen(  "a_p2xaxi","w");
 fprintf(fp," %0.6f   %0.6f\n",  c,((*P_f)(c)));
 fprintf(fp," %0.6f   0.", c-( ((*P_f)(c)) / ((*PDf)(c)) ));
  fclose(fp);
}
/* ---------------------------------- */
/* ---------------------------------- */

Dans ce fichier il y a la déclaration des fichiers h.