dear Barton,
thank you, fun_table() is a fun to use: works and looks first class!
HTH Wolfgang
"Barton Willis" <willisb at unk.edu> schrieb:
> 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