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

xvec = {0, 2/10,4/10,6/10,8/10,1,12/10,14/10,16/10,18/10,2,25/10,3,35/10,4,45/10,5,6,8,10};
fvec = {};
num = Length [ xvec ];

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

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