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

xvec = {2/10, 4/10, 6/10, 8/10,
1, 1, 1, 2,
3, 4, 5,6,
6, 6, 6, 6,
7}
yvec={1, 1, 1, 1,
2/10, 4/10, 1, 2,
3, 4, 5, 2,
3, 4, 5, 6,
7}
fvec = {}
num = Length [ xvec];

Do [ { x = xvec[[i]],
     y=yvec[[i]],f= Beta[x,y] ,
fvec = Append [ fvec, f ],
      Print["  Beta[",x,",",y,"]=",N[f,16]] },{i,1,num,1}]

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