Robert Dodier pisze:
> 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
Thx. I have tried 3 methods :
(%i1) load("D:/doc/programming/maxima/batch/ExternalRay/eAngle.mac")$
(%i2) plot2d(GiveLengthDifference, [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:
0.0
#0: GiveLengthDifference(period=1.0)(eAngle.mac line 96)
-- an error. To debug this try debugmode(true);
(%i3) 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:
0.0
If 4 arguments are given to MAKELIST, the difference of the 3rd and 4th
arguments should evaluate to a non-negative integer:
0.2271093782413
If 4 arguments are given to MAKELIST, the difference of the 3rd and 4th
arguments should evaluate to a non-negative integer:
0.48000809132517
.... ( it repeats many time, number grows )
(%i4) plot2d('GiveLengthDifference, [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:0.0#0:
GiveLengthDifference(period=1.0)(eAngle.mac line 96) -- an error. To
debug this try debugmode(true);
(:-|
I can make a list of points and display it, but plot2d is ( or should be
) simpler.
Adam