Practical 7: Symbolic Toolbox

Practical 7

Graphing ezplot

The Symbolic Toolbox command ezplot is very convenient for plotting. You will need to specify the symbolic function and the endpoints (optional). By default, the endpoints are -2 \pi and 2 \pi.  Hence, you will need to determine endpoints only if they are different from the default ones.

Note: It is possible to plot several functions on the same graph using ezplot and hold on, hold off commands. But the graphs will have the same line properties (colour, thickness, etc) and thus sometimes are hard to distinguish.

> Exercise: Using the ezplot command

> Type the following code and examine output plots.

syms x

ezplot(sin(x))

ezplot(sin(x),[-pi pi])

hold on

ezplot(sin(x))

ezplot(3*x+2)

hold off