On Tue, Jun 12, 2007 at 11:42:42AM -0400, sen1 at math.msu.edu wrote:
> I guess one of my questions is:
>
> What kind of object is actually produced by
>
> (%i5) linearinterpol([[2,1], [3,2], [4,3]]);
the object produced by CALLING the function linearinterpol is an
expression involving charfun2 etc.
However, when you say
f(x) := linearinterpol....
you don't CALL linearinterpol at that time... Instead you create a
function f(x) which WHEN IT IS CALLED will call linearinterpol to
produce a charfun2 expression.
What you want is first to compute a linear interpolation expression,
and then define a function which will use that expression.
interpolexpr: linearinterpol(....);
f(x) := interpolexpr;
you can also use the "define" operator
define(f(x),linearinterpol(...))
The difference here is that when you call "define" it DOES evaluate
its second argument AT THE TIME THE CALL TO DEFINE OCCURS. Note that
define quotes its first argument.... this whole quoting and nonquoting
thing has been the cause of many discussions on this list.
Hope this helps,
--
Daniel Lakeland
dlakelan at street-artists.org
http://www.street-artists.org/~dlakelan