MATLAB Function Reference | ![]() ![]() |
Syntax
ezplot(f) ezplot(f,[min,max]) ezplot(f,[xmin,xmax,ymin,ymax]) ezplot(x,y) ezplot(x,y,[tmin,tmax]) ezplot(...,figure)
Description
ezplot(f)
plots the expression f = f(x) over the default domain: -2 < x < 2
.
ezplot(f,[min,max])
plots f = f(x) over the domain: min
< x < max
.
For implicitly defined functions, f = f(x,y):
ezplot(f)
plots f(x,y) = 0 over the default domain -2 < x < 2
, -2
< y < 2
.
ezplot(f,[xmin,xmax,ymin,ymax])
plots f(x,y) = 0 over xmin
< x < xmax
and ymin
< y < ymax
.
ezplot(f,[min,max])
plots f(x,y) = 0 over min
< x < max
and min
< y < max
.
If f is a function of the variables u and v (rather than x and y), then the domain endpoints umin, umax, vmin, and vmax are sorted alphabetically. Thus, ezplot('u^2 - v^2 - 1',[-3,2,-2,3])
plots u2 - v2 - 1 = 0 over -3 < u < 2, -2 < v < 3.
ezplot(x,y)
plots the parametrically defined planar curve x = x(t) and y = y(t) over the default domain 0 < t < 2.
ezplot(x,y,[tmin,tmax])
plots x = x(t) and y = y(t) over tmin
< t < tmax
.
ezplot(...,figure)
plots the given function over the specified domain in the figure window identified by the handle figure
.
Remarks
Array multiplication, division, and exponentiation are always implied in the expression you pass to ezplot
. For example, the MATLAB syntax for a plot of the expression,
which represents an implicitly defined function, is written as:
That is, x^2
is interpreted as x.^2
in the string you pass to ezplot
.
Examples
This example plots the implicitly defined function,
See Also
Function Plots for related functions
![]() | ezmeshc | ezplot3 | ![]() |