next up previous
Next: About this document ... Up: xyplots Previous: xyplots

Doing xy plots in Matlab

The simplest way to do this is using ezplot. To plot the function $f(x)$ over the interval $[a,b]$, simply type


ezplot('f(x)',[a,b]).
For instance, a plot of the function $f(x)=x^2e^x$ on the interval $[-1,1]$ is obtained by

ezplot('x^2*exp(x)',[-1,1]).


Michael Renardy
2000-02-11