Symbolic Math Toolbox | ![]() ![]() |
Syntax
ezsurf(f) ezsurf(f,domain) ezsurf(x,y,z) ezsurf(x,y,z,[smin,smax,tmin,tmax]) or ezsurf(x,y,z,[min,max]) ezsurf(...,n) ezsurf(...,'circ')
Purpose
ezsurf(f)
creates a graph of f(x,y), where f
is a symbolic expression that represents a mathematical function of two variables, such as x and y.
ezsurf
(f,domain) plots f over the specified domain
. domain
can be either a 4-by-1 vector [xmin, xmax, ymin, ymax] or a 2-by-1 vector [min, max] (where, min < x < max, 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, ezsurf(u^2
- v^3,[0,1],[3,6])
plots u2 - v3 over 0 < u < 1, 3 < v < 6.
ezsurf(x,y,z)
plots the parametric surface x = x(s,t), y = y(s,t), and z = z(s,t) over the squareezsurf(x,y,z,[smin,smax,tmin,tmax])
or ezsurf(x,y,z,[min,max])
plots the parametric surface using the specified domain.
ezsurf(...,n)
plots f over the default domain using an n
-by-n
grid. The default value for n
is 60.
ezsurf(...,'circ')
plots f over a disk centered on the domain
Remarks
rotate3d
is always on. To rotate the graph, click and drag with the mouse.
Examples
ezsurf
does not graph points where the mathematical function is not defined (these data points are set to NaN
s, which MATLAB does not plot). This example illustrates this filtering of singularities/discontinuous points by graphing the function,
syms x y ezsurf(real(atan(x+i*y)))Note also that
ezsurf
creates graphs that have axis labels, a title, and extend to the axis limits.
See Also
ezcontour
, ezcontourf
, ezmesh
, ezmeshc
, ezplot
, ezpolar
, ezsurfc
, surf
![]() | ezpolar | ezsurfc | ![]() |