(*  sinh_values.nb *)
(* *)
(*  Purpose: *)
(*    Evaluate the hyperbolic sine function *)
(*    at selected argument values, *)
(*    and write the data to a file. *)
(* *)
(*  Modified:  23 June 2007 *)
(*  Author:  John Burkardt *)

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

Do [ { x = xvec[[i]],f = Sinh[x],
fvec = Append [ fvec, f ],
      Print["  Sinh[",x,"]]=",N[f,20]] },{i,1, num,1}]

fileout=OpenWrite["C:\\Documents and Settings\\burkardt.BURKARDTPC\\Desktop\\Misc\\mathematica\\sinh_values.txt"];
SetOptions[fileout,FormatType->TextForm];
Write[fileout,"#  sinh_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,20],"  ",N[f,20]]},{i,1,num,1}];Close[fileout];