Mathc initiation/a576
Installer ce fichier dans votre répertoire de travail.
kg_u.h |
---|
/* --------------------------------- */
/* save as kg_u.h */
/* --------------------------------- */
void G_U(
CTRL_splot w,
tvalue t,
double (*P_U)(double x)
)
{
FILE *fp;
double i;
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"
" \"U\" with line lt 7 lw 4\n\n"
" reset\n\n\n",
w.xmin,w.xmax,w.ymin,w.ymax);
fclose(fp);
fp = fopen("U","w");
for(i=t.min; i<=t.max; i+=t.step)
fprintf(fp," %6.3f %6.3f\n",i,(*P_U)(i));
fclose(fp);
}
/* --------------------------------- */
/* --------------------------------- */
Déclaration des fichiers h.