Sommaire


Installer ce fichier dans votre répertoire de travail.


kg_f_ab.h
/* --------------------------------- */
/* save as kg_f_ab.h                 */
/* --------------------------------- */
void G_f_ab(
CTRL_splot w,
double ax,
double bx,
  char veq[],
double (*P_v)(double x),
  char ueq[],
double (*P_u)(double x)
)
{
FILE   *fp = fopen("a_main.plt","w");

 fprintf(fp," set zeroaxis lt 8\n" 
            " set grid\n\n" 
            " plot [%0.3f:%0.3f] [%0.3f:%0.3f]\\\n"
            " %s     with line    lt  7 lw 2,\\\n"
            " %s     with line    lt  8 lw 2,\\\n"            
            " \"ab\" with line    lt  9 lw 2\n"
            " reset\n\n",
             w.xmin,w.xmax,w.ymin,w.ymax,
             veq,ueq);
  fclose(fp);

 fp = fopen("ab",  "w");
 
 fprintf(fp," %0.6f   %0.6f  \n", ax, ((*P_v)(ax)));
 fprintf(fp," %0.6f   %0.6f\n\n", ax, ((*P_u)(ax)));
 
 fprintf(fp," %0.6f   %0.6f  \n", bx, ((*P_v)(bx)));
 fprintf(fp," %0.6f   %0.6f  \n", bx, ((*P_u)(ax)));
  fclose(fp);
          
  printf(" ... load \"a_main.plt\" ... with gnuplot.\n\n");             
}
/* --------------------------------- */
/* --------------------------------- */


Déclaration des fichiers h.