On 11/30/08, Adam Majewski <adammaj1 at o2.pl> wrote:
> (%i21) plot2d(GiveLengthDifference(x),[x,1,10]);
> If 4 arguments are given to MAKELIST, the difference of the 3rd and 4th
> arguments should evaluate to a non-negative integer:
plot2d evaluates its arguments, in particular, it calls GiveLengthDifference
with the argument x. I guess that function calls makelist with some
argument which is an expression in x. makelist can't handle the symbolic
expression, so it complains.
Try plot2d(GiveLengthDifference, [x, 1, 10]); instead -- that postpones
evaluation of the function until x is bound to a numeric value.
HTH
Robert Dodier