Mathc initiation/Fichiers h : c39fd
Installer ce fichier dans votre répertoire de travail.
kg_c.h |
---|
/* --------------------------------- */
/* save as kg_c.h */
/* --------------------------------- */
void G_C_2d(
CTRL_splot w,
double (*P_f)(double x),
double x,
char feq[]
)
{
FILE *fp;
fp = fopen("a_main.plt","w");
fprintf(fp," reset\n"
" set zeroaxis lt 8\n"
" set grid\n\n"
" set size ratio -1\n"
" plot [%0.3f:%0.3f] [%0.3f:%0.3f]\\\n"
" \"a_r\" with linespoints lt 16 lw 3,\\\n"
" \"circle\" with line lt 7 lw 3,\\\n"
" %s with line lt 6 lw 3\n",
w.xmin,w.xmax,w.ymin,w.ymax,
feq);
fclose(fp);
fp = fopen("a_r","w");
fprintf(fp," %6.5f %6.5f\n",h_y_2d((*P_f),x),
k_y_2d((*P_f),x));
fprintf(fp," %6.5f %6.5f\n",x,(*P_f)(x));
fclose(fp);
}
/* --------------------------------- */
/* --------------------------------- */