[Maxima] plotting data that is in an array
Doug Stewart
doug.dastew
Thu Feb 24 23:05:10 WET 2011
On Thu, Feb 24, 2011 at 5:00 PM, Mario Rodriguez <biomates at telefonica.net>wrote:
> El jue, 24-02-2011 a las 16:15 -0500, Doug Stewart escribi?:
> >
> >
> > On Thu, Feb 24, 2011 at 3:59 PM, Jaime Villate <villate at fe.up.pt>
> > wrote:
> > On Wed, 2011-02-23 at 10:56 -0500, Doug Stewart wrote:
> > > I tried: plot2d(difar[x],[x,1,200]); plot2d: expression
> > evaluates to
> > > non-numeric value somewhere in plotting range.
> >
> >
> > The form plot2d(difar[x], [x,1,200]);
> > would only work if difar[x] existed for any value of x between
> > 1 and
> > 200, for instance difar[2.345409689].
> > To make a plot with points, look at the examples of plot2d
> > with the
> > "discrete" option in the manual (? plot2d).
> > Regards,
> > Jaime
> >
> > I guess i'm not smart enough to use maxima, because I still don't get
> > it.
> >
> >
> > I have an array made with
> > array(difar,270);
> > I have put numbers in the array.
> > I want to plot the array. Could someone give me an exact line that
> > will plot this array?
>
>
>
> (%i2) array(a,5) $
> (%i3) for i:0 thru 5 do a[i]: bfloat(random(1.0))$
> (%i4) plot2d( [discrete, listarray (a)] ) $
>
> or:
>
> (%i5) load(draw)$
> (%i6) draw2d(
> points_joined=true,
> points(listarray(a))) $
>
> --
> Mario
>
>
> Thanks Mario.
In display(points) I saw :
Array with ordinates.
(%i1) load(draw)$
(%i2) a: make_array (flonum, 100) $
(%i3) for i:0 thru 99 do a[i]: random(1.0) $
(%i4) draw2d(points(a)) $
but when I try
plot2d(points(ar));
I got:
No range given. Must supply range of the form [variable,min,max]
-- an error. Entering the Maxima debugger.
So from my point of view the info in display(points) must be wrong.
I see that your example you used listarray but this was not in that help
section that I saw.
Any way thanks and all is well now.
Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20110224/7931dff7/attachment-0001.html>
More information about the Maxima-discuss
mailing list