ezmesh
Mesh surface plot of a function of two variables given as a handle or expression.
Category: Graphics > 2-D and 3-D Plots
Syntax
ezmesh(f)
Draws the surface z = f(x,y) as a mesh over the default domain, -2*pi to 2*pi in both variables.
ezmesh(f, domain)
Restricts the plot to [min max] or [xmin xmax ymin ymax].
h = ezmesh(___)
Also returns the surface handle.
Description
ezmesh builds the grid itself and draws the wireframe, so only the function is needed. fmesh is the current replacement, with options for the number of points and for parametric surfaces.
Input arguments
f- Function handle or character vector in
xandy. domain- Two or four numbers that set the plotting region.
Output arguments
h- Handle to the surface object.
Example
Product surface
ezmesh(@(x,y) x.*exp(-x.^2 - y.^2), [-2 2])
In the app, the figure is drawn below the code.