(*  bessel_y1_values.nb *)
(* *)
(*  Purpose: *)
(*    Evaluate the Bessel Y1 *)
(*    function at selected argument values fx(x), *)
(*    and write the data to a file. *)
(* *)
(*  Modified:  12 December 2005 *)
(*  Author:  John Burkardt *)

xvec = {1/10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 }
fvec = {}
num = Length [ xvec ];

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

fileout=OpenWrite["/Users/burkardt/public_html/math_src/test_values/bessel_y1_values.txt"];
SetOptions[fileout,FormatType->TextForm];
Write[fileout,"#  bessel_y1_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];