ezplot

Plots a function of one variable, or an implicit or parametric curve, from a handle or expression.

Category: Graphics > 2-D and 3-D Plots

Syntax

ezplot(f)

Plots f(x) over the default interval -2*pi < x < 2*pi.

ezplot(f, [xmin xmax])

Plots over the given interval.

ezplot(x, y)

Plots the parametric curve x(t), y(t) for 0 < t < 2*pi.

h = ezplot(___)

Also returns the line handle.

Description

ezplot samples the function automatically and draws it with the title set from the expression. It is kept for older code; fplot (explicit and parametric) and fimplicit (implicit) are the current functions.

Input arguments

f
Function handle or character vector in x. With two variables it is an implicit curve f(x,y) = 0.
x, y
Handles for the two coordinate functions of a parametric curve.
[xmin xmax]
Interval to plot.

Output arguments

h
Handle to the line.

Example

A function on an interval

ezplot(@(x) sin(x).*exp(-x/4), [0 4*pi])

In the app, the figure is drawn below the code.

See also

fplot fimplicit ezplot3 ezpolar plot