plotting data that is in an array



On Thu, Feb 24, 2011 at 4:37 PM, Jaime Villate <villate at fe.up.pt> wrote:

> On Thu, 2011-02-24 at 16:15 -0500, Doug Stewart wrote:
> > 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?
> If you want to plot points in 2d, you need two values (x and y
> coordinates) for each point. Assuming that you mean to use the values of
> the array for the y coordinates of 270 points, and that you want the x
> coordinates to be 1, 2, 3, ..., 270, you would then do:
>
> points: makelist( [i, difar[i]], i, 1, 270 );
> plot2d( [discrete, points] );
>
> Regards,
> Jaime
>
>
> Thank you Jaime--- It works!!!!
Doug