This might get started:
(%i1) fun_table(f,lo, hi, n) := block([h,l],
h : (hi - lo) / n,
l : makelist(lo + i * h, i,0, n),
funmake('matrix, map(lambda([x], [x, apply(f,[x])]), l)))$
(%i2) fun_table('cos,0,%pi,4);
(%o2)
matrix([0,1],[%pi/4,1/sqrt(2)],[%pi/2,0],[(3*%pi)/4,-sqrt(2)/2],[%pi,-1])
(%i3) fun_table(lambda([x],x^2),0,1,4);
(%o3) matrix([0,0],[1/4,1/16],[1/2,1/4],[3/4,9/16],[1,1])
Barton
-----maxima-bounces at math.utexas.edu wrote: -----
>To: "maxima-help" <maxima at math.utexas.edu>
>From: Wolfgang Lindner
>Sent by: maxima-bounces at math.utexas.edu
>Date: 05/18/2007 03:50PM
>Subject: aesthetic function value table
>
>dear experts,
>
>here is a simple version of a function's x --> x^2 value table:
>
> for x:1 thru 2 step 1/4 do disp([x,x^2]);
>
>which results in:
>
>[1,1]
>...
>[2,4]
>
>ok, it works.
>But I would like to have a more aesthetic table, perhaps in matrix form
>(genmatrix does
>not work for me in this example, maybe I'm doing something wrong) or with
>better
>formating:
>
>- -
>|1 1|
>|.. |
>|2 4|
>- -
>
>What is your prefered way to display function tables?
>Any hints are very welcome.
>
>HTH Wolfgang
>
>
>
>--
>Beste Gruesse Wolfgang Lindner
>
>Moderator Sprint-Studium Mathematik NRW (FernUniversit?t Hagen)
>Staedtisches Gymnasium, Stockhauserstr. 13, 42929 Wermelskirchen
>privat: Wolfgang Lindner, Stieglitzweg 6, D-42799 Leichlingen
>LindnerW at t-online.de Tel: +49 02175 71163
> Mobile: 0160 946 150 77
>
>_______________________________________________
>Maxima mailing list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima