(*  laguerre_general_values.nb *)
(* *)
(*  Purpose: *)
(*    Evaluate the generalized Laguerre *)
(*    functions at selected argument values, *)
(*    and write the data to a file. *)
(* *)
(*  Modified:  27 January 2006 *)
(*  Author:  John Burkardt *)

nvec={ 5,5,5,5,5,5,5,
8,8,8,8,8,8,
0,1,2,3,4,5,6
};
avec={ 0,1/4,1/2,3/4,15/10,25/10,5,
12/10,12/10,12/10,12/10,12/10,12/10,
52/10,52/10,52/10,52/10,52/10,52/10,52/10
};
xvec={1/4,1/4,1/4,1/4,1/4,1/4,1/4,
0,1/5,2/5,3/5,4/5,1,
3/4,3/4,3/4,3/4,3/4,3/4,3/4
};
fvec = {};
num = Length [ xvec ];

Do [ { n=nvec[[i]],a=avec[[i]],x=xvec[[i]], f = LaguerreL[n,a,x] ,
fvec = Append [ fvec, f ],
      Print["L[",n,",",a,",",x,"]=",N[f,16]] },{i,1,num,1}]

fileout=OpenWrite["/Users/jburkardt/public_html/math_src/test_values/laguerre_general_values.txt"];
SetOptions[fileout,FormatType->TextForm];
Write[fileout,"#  laguerre_general_values.txt"];today=DateList[];Write[fileout,"#  Created on ",today];Write[fileout,"#"];
Write[fileout,"#  n  a  x  f"];
Write[fileout,"#"];
Do[{n=nvec[[i]];a=avec[[i]];;x=xvec[[i]];f=fvec[[i]];Write[fileout,n,"  ",N[a,16],"  " N[x,16],"  ",N[f,16]]},{i,1,num,1}];Close[fileout];