(*  fresnel_sin_values.nb *)
(* *)
(*  Purpose: *)
(*    Evaluate the derivative of the Fresnel *)
(*    sine integral at selected argument values, *)
(*    and write the data to a file. *)
(* *)
(*  Modified:  18 January 2006 *)
(*  Author:  John Burkardt *)

xvec = {};
Do [ { x = i/10,
xvec = Append[ xvec, x ] },{i,0,30,2}]
fvec = {};
num = Length [ xvec ];

Do [ { x = xvec[[i]],f = FresnelS[x],
fvec = Append [ fvec, f ],
      Print["  FresnelS[",x,"]=",N[f,16]] },{i,1,num,1}]

fileout=OpenWrite["C:\\Documents and Settings\\burkardt\\Desktop\\Misc\\mathematica\\fresnel_sin_values.txt"];
SetOptions[fileout,FormatType->TextForm];
Write[fileout,"#  fresnel_sin_values.txt"];today=DateList[];Write[fileout,"#  Created on ",today];Write[fileout,"#"];
Write[fileout,"#  x  fx"];
Write[fileout,"#"];
Do[{x=xvec[[i]];f=fvec[[i]];Write[fileout,N[x,16],"  ",N[f,16]]},{i,1,num,1}];Close[fileout];