fmesh
Plot 3-D mesh
Syntax
Description
fmesh(
creates a
mesh plot of the symbolic expression f
)f(x,y)
over
the default interval [-5 5]
for x
and y
.
fmesh(
plots f
,[xmin xmax
ymin ymax]
)f(x,y)
over the interval [xmin xmax]
for x
and [ymin ymax]
for
y
. The fmesh
function uses
symvar
to order the variables and assign intervals.
fmesh(
plots
the parametric mesh funx,funy,funz
)x = x(u,v)
, y = y(u,v)
, z
= z(u,v)
over the interval [-5 5]
for u
and v
.
fmesh(
plots the parametric mesh funx,funy,funz
,[uvmin
uvmax]
)x
= x(u,v)
, y = y(u,v)
, z = z(u,v)
over
the interval [uvmin uvmax]
for u
and v
.
fmesh(
plots the parametric mesh funx,funy,funz
,[umin
umax vmin vmax]
)x = x(u,v)
, y =
y(u,v)
, z = z(u,v)
over the interval
[umin umax]
for u
and [vmin
vmax]
for v
. The fmesh
function uses
symvar
to order the parametric variables and assign intervals.
fmesh(___,
uses
the LineSpec
)LineSpec
to set the line style, marker symbol,
and plot color.
fmesh(___,
specifies
surface properties using one or more Name,Value
)Name,Value
pair
arguments. Use this option with any of the input argument combinations
in the previous syntaxes.
fmesh(
plots
into the axes with the object ax
,___)ax
instead of the
current axes object gca
.
returns
a function surface object or a parameterized function surface object.
Use the object to query and modify properties of a specific mesh.obj
= fmesh(___)
Examples
Input Arguments
Output Arguments
Tips
For additional examples, follow the
fsurf
page becausefmesh
andfsurf
share the same syntax. All examples on thefsurf
page apply tofmesh
.
Algorithms
fmesh
assigns the symbolic variables
in f
to the x-axis, then the y-axis,
and symvar
determines the order of the variables to be assigned. Therefore, variable
and axis names might not correspond. To force fmesh
to assign
x or y to its corresponding axis, create the symbolic
function to plot, then pass the symbolic function to fmesh
.
For example, the following code plots the mesh of f(x,y) = sin(y) in two ways. The first way forces the waves to oscillate with respect to the y-axis. In other words, the first plot assigns the y variable to the corresponding y-axis. The second plot assigns y to the x-axis because it is the first (and only) variable in the symbolic function.
syms x y; f(x,y) = sin(y); figure; subplot(2,1,1) fmesh(f); subplot(2,1,2) fmesh(f(x,y)); % Or fmesh(sin(y));
Version History
Introduced in R2016a