*/
Do you receive the Programmer's Heaven newsletter? If not, why not subscribe?
*/

View \xiarc.h

Calculus (Derivative:Tangent). v04

Submitted By: xhunga
Rating: (Not rated) (Rate It)


/* f.h                    freeware                          [[Email Removed]] */

/* ------------------------------------- FUNCTION --------------------------  */
/* Do    :                                                                    */
/*                                                                            */
/* -------------------------------------------------------------------------- */
void   gplt_ArcLength(
double xmin,
double xmax,
double ymin,
double ymax,
double a,
double b,
double step,
  char feq[TXT_EQ],
double (*P_f)(double x)
)
{
FILE   *fp;
char    FA[FILENAME] = "a";
char    FB[FILENAME] = "b";
char    FL[FILENAME] = "l";
double  t;
double  i;

        fp = fopen("f_Df.plt","w");

fprintf(fp,"#\n");
fprintf(fp,"# Worksheet for gp371w32.exe by xhunga bernard 06000 Nice France\n");
fprintf(fp,"#\n\n");
fprintf(fp," set zeroaxis lt 8\n");
fprintf(fp," set grid\n\n");
fprintf(fp," plot [%0.3f:%0.3f] [%0.3f:%0.3f] ",xmin,xmax,ymin,ymax);
fprintf(fp,"%s",feq);
fprintf(fp,", ");
fprintf(fp," \"%s\" with linesp lt 3 pt 1",FA);
fprintf(fp,", ");
fprintf(fp," \"%s\" with linesp lt 3 pt 1",FB);
fprintf(fp,", ");
fprintf(fp," \"%s\" with linesp lt 3 pt 1",FL);


fprintf(fp,"\n\n");
fprintf(fp," reset");

             fclose(fp);


        fp = fopen(FA,  "w");

t = ((*P_f)(a)) ;
fprintf(fp," %0.6f   %0.6f\n", a, t);
fprintf(fp," %0.6f   %0.6f\n", a, 0.0);

             fclose(fp);

        fp = fopen(FB,  "w");

t = ((*P_f)(b)) ;
fprintf(fp," %0.6f   %0.6f\n", b, t);
fprintf(fp," %0.6f   %0.6f\n", b, 0.0);

             fclose(fp);


        fp = fopen(FL,  "w");

i = a;
do{
   t = ((*P_f)(i)) ;
   fprintf(fp," %0.6f   %0.6f\n", i, t);
   i += step;
}while(i <=  b);

             fclose(fp);


}

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.