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

xvec={ 1/512, -1/128,1/16,-1/4,1,5/4,2,-4,15/2,11,23/2,-16,20,25,-30,50,75, -80, 100, -125 };
fvec = {};
num = Length [ xvec ];

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

fileout=OpenWrite["C:\\Documents and Settings\\burkardt\\Desktop\\Misc\\mathematica\\struve_h1_values.txt"];
SetOptions[fileout,FormatType->TextForm];
Write[fileout,"#  struve_h1_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];