(*  struve_l0_values.nb *)
(* *)
(*  Purpose: *)
(*    Evaluate the Struve L0 *)
(*    function at selected argument values, *)
(*    and write the data to a file. *)
(* *)
(*  Modified:  13 February 2006 *)
(*  Author:  John Burkardt *)

xvec={ 1/512, -1/32,1/8,-1/2,1,2,-4,7,-10,16,65/4,-17,20,45/2,-25,30,-40,50,60,-70 };
fvec = {};
num = Length [ xvec ];

n = 0;
Do [ { x = xvec[[i]], f = StruveL[n,x] ,
fvec = Append [ fvec, f ],
      Print["L[",n,",",x,"]=",N[f,20]] },{i,1, num,1}]

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