fsurf
R2026bPlot 3-D surface
Syntax
Description
fsurf( creates a surface plot of
the symbolic expression f)f(x,y) over the default interval
[-5 5] for x and
y.
fsurf( plots f,[xmin xmax
ymin ymax])f(x,y) over the interval
[xmin xmax] for x and [ymin
ymax] for y. The fsurf function uses
symvar to order the variables and assign intervals.
fsurf( plots the
parametric surface funx,funy,funz)x = x(u,v), y = y(u,v),
z = z(u,v) over the interval [-5 5]
for u and v.
fsurf( plots the parametric surface 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.
fsurf( plots the parametric surface 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 fsurf function uses
symvar to order the parametric variables and assign intervals.
fsurf(___, uses
LineSpec)LineSpec to set the line style, marker symbol, and face
color. Use this option after any of the previous input argument
combinations.
fsurf(___,
specifies line properties using one or more name-value arguments. Use this
option after any of the input argument combinations in the previous
syntaxes.Name=Value)
fsurf( plots into
the axes with the object ax,___)ax instead of the current axes
object gca.
returns
a function surface object or parameterized function surface object, depending on
the type of surface. Use the object to query and modify properties of a specific
surface. For details, see FunctionSurface Properties and ParameterizedFunctionSurface Properties.fs = fsurf(___)
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Algorithms
fsurf 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 fsurf to assign
x or y to its corresponding axis, create the symbolic
function to plot, then pass the symbolic function to fsurf.
For example, the following code plots 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) fsurf(f); subplot(2,1,2) fsurf(f(x,y)); % Or fsurf(sin(y));

Version History
Introduced in R2016a





![Figure contains an axes object. The axes object with title ysin(x) - xcos(y) for x and y in [- 2 pi , 2 pi ], xlabel x, ylabel y contains an object of type functionsurface.](../examples/symbolic/AddTitleAndAxisLabelsAndFormatTicksExample_01.png)















