Previous: Three-dimensional Function Plotting, Up: Three-Dimensional Plots [Contents][Index]
Generate three matrices in meshgrid format, such that
surf (x, y, z) generates a unit cylinder.
The matrices are of size n+1-by-n+1.
r is a vector containing the radius along the z-axis.
If n or r are omitted then default values of 20 or [1 1]
are assumed.
Called with no return arguments, cylinder calls directly
surf (x, y, z). If an axes handle ax
is passed as the first argument, the surface is plotted to this set
of axes.
Examples:
[x, y, z] = cylinder (10:-1:0, 50);
surf (x, y, z);
title ("a cone");
See also: sphere.
Generate three matrices in meshgrid format, such that
surf (x, y, z) generates a unit sphere.
The matrices of n+1-by-n+1. If n is
omitted then a default value of 20 is assumed.
Called with no return arguments, sphere call directly
surf (x, y, z). If an axes handle is passed
as the first argument, the surface is plotted to this set of axes.
See also: peaks.
Generate three matrices in meshgrid format that define an
ellipsoid. Called with no return arguments, ellipsoid calls
directly surf (x, y, z). If an axes handle
is passed as the first argument, the surface is plotted to this
set of axes.
See also: sphere.
Previous: Three-dimensional Function Plotting, Up: Three-Dimensional Plots [Contents][Index]