Plot Arrays
04: Create and plot an array
Create an array x=(2, 2.3, 2.6, ..., 4.7, 5)
and then plot sqrt(x) vs. x --
as a line plot, and then as a point plot
| Mathematica:
x = Table[ w, ] ListPlot[Transpose[], PlotJoined->True] ListPlot[Transpose[]] |
Matlab:
x = 2 : 0.3 : 5 (or interactively) plot(x, sqrt(x)) plot(x, sqrt(x), '*') |
| Maple:
t := [seq(2+i*0.3,i=0..10)]; listplot(map(sqrt,t)); listplot(map(sqrt,t),style=point); |
IDL:
x = 0.3 * findgen(11) + 2 plot, x, sqrt(x) plot, x, sqrt(x), psym=4 |
