Sommaire


Installer ce fichier dans votre répertoire de travail.

g_tanxm.h
/* ---------------------------------- */
/* save as g_tanxm.h                  */
/* ---------------------------------- */
void G_TanxM(
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_PX\"       with linesp lt 7 lw 4 ps 2,\\\n"
           " \"a_AM\"       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_PX","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);
 
         fp = fopen("a_AM","w");
 fprintf(fp," %0.6f   0.\n", c-(((*P_f)(c))/((*PDf)(c))));
 fprintf(fp," %0.6f   0.  ", c);
  fclose(fp);
}
/* ---------------------------------- */
/* ---------------------------------- */

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