ezsurf

Shaded surface plot of a function of two variables given as a handle or expression.

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

Syntax

ezsurf(f)

Draws z = f(x,y) as a colored surface over the default domain, -2*pi to 2*pi in both variables.

ezsurf(f, domain)

Restricts the plot to [min max] or [xmin xmax ymin ymax].

h = ezsurf(___)

Also returns the surface handle.

Description

ezsurf creates the grid, evaluates the function and draws the surface with colors that follow the height. It predates fsurf, which is the recommended function today.

Input arguments

f
Function handle or character vector in x and y.
domain
Two or four numbers that set the plotting region.

Output arguments

h
Handle to the surface object.

Example

Paraboloid

ezsurf(@(x,y) x.^2 + y.^2, [-2 2])

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

See also

ezsurfc fsurf surf ezmesh