(*  bessel_yx_values.nb *)
(* *)
(*  Purpose: *)
(*    Evaluate the Bessel Y function at *)
(*    selected REAL orders N and argument values X, *)
(*    and write the data to a file. *)
(* *)
(*  Modified:  31 March 2007 *)
(*  Author:  John Burkardt *)

nvec={1/2,1/2,1/2,1/2,1/2,1/2,1/2,1/2,3/2,3/2,3/2,3/2,3/2,5/2,5/2,5/2,5/2,5/2,5/4,5/4,5/4,5/4,5/4,11/4,11/4,11/4,11/4,11/4}
xvec = {2/10,1,2,25/10,3,5,10,20,1,2,5,10,50,1,2,5,10,50,1,2,5,10,50,1,2,5,10,50}
fvec = {};
num = Length[nvec];

Do [ {
 n=nvec[[i]],
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_yx_values.txt"];
SetOptions[fileout,FormatType->TextForm];
Write[fileout,"#  bessel_yx_values.txt"];today=DateList[];Write[fileout,"#  Created on ",today];Write[fileout,"#"];
Write[fileout,"#  n  x  fx"];
Write[fileout,"#"];
Do[{n=nvec[[i]];x=xvec[[i]];f=fvec[[i]];Write[fileout,N[n,16],"  ",N[x,16],"  ",N[f,16]]},{i,1,num,1}];Close[fileout];