MATLAB is a digital tool, and as such can only work with finite subsets of the domains and ranges of real functions. However, like graphing calculators and other software tools, MATLAB is fully capable of calculating enough data points you can produce a representation of a continuous function of sufficient precision for nearly any qualitative evaluation of its properties. Use the "ezplot" function to quickly create a plot of a function in MATLAB.

- Skill level:
- Easy

### Other People Are Reading

## Instructions

- 1
Type the "ezplot" command, supplying the function to be plotted as a string that MATLAB can parse:

ezplot('sin(x)')

The plot appears in a new window. The graph's bounds are automatically determined.

- 2
Specify the region of the function's domain to be plotted by adding a vector as the second argument to "ezplot":

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

- 3
Specify the range to be plotted as well by using a four-element vector:

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

- 4
Graph a parametric equation by passing the two functions of the parameter as separate arguments to "ezplot":

ezplot('sin(t)','cos(t)')

This is equivalent to plotting the following set of parametric equations:

x = sin(t)

y = cos(t)

Specify the values of the parameter to be plotted by supplying a vector as the third argument, just as in Step 2.