Sommaire


Installer ce fichier dans votre répertoire de travail.

kg_l.h
/* --------------------------------- */
/* save as kg_l.h                    */
/* --------------------------------- */
void G_length(
CTRL_splot p,
double (*P_f)(double t),
double (*P_g)(double t),
tvalue t
)
{
FILE *fp = fopen("a_main.plt","w");

  fprintf(fp," reset\n"
             " set size ratio -1\n"
             " set zeroaxis lt 8\n" 
             " set grid\n\n" 
             " plot [%0.3f:%0.3f] [%0.3f:%0.3f]\\\n" 
             " \"length\" with lines lt 1 lw 3,\\\n"
             " \"ab\"     with lines lt 7 lw 3 dt 2\n",
               p.xmin,p.xmax,p.ymin,p.ymax);
  fclose(fp);


  fp = fopen("length","w");
  for(t.value=t.min; t.value<t.max; t.value+=t.step)
      fprintf(fp," %6.3f  %6.3f\n",    (*P_f)(t.value),(*P_g)(t.value));
      
  fprintf(fp," %6.3f  %6.3f\n",        (*P_f)(t.max),  (*P_g)(t.max)); 
  fclose(fp);
  
  
  fp = fopen("ab","w");  
  fprintf(fp," 0 0\n %6.3f  %6.3f\n\n",(*P_f)(t.min),(*P_g)(t.min));    
         
  fprintf(fp," 0 0\n %6.3f  %6.3f\n\n",(*P_f)(t.max),(*P_g)(t.max)); 
  fclose(fp);
}
/* --------------------------------- */
/* --------------------------------- */