cylinder
- :
[x, y, z] =cylinder()¶ - :
[x, y, z] =cylinder(r)¶ - :
[x, y, z] =cylinder(r, n)¶ - :
h =cylinder(…)¶ - : cylinder
(ax, …)¶ Generate the surface of a body of revolution about the z axis.
The vector r gives the radius profile (default
[1 1]); a scalar radius describes a straight cylinder. The circumference is sampled with n segments (default 20), so the result matrices havenumel (r)rows andn+1columns, the last column repeating the first. Row i lies at height(i-1)/(numel (r)-1).With three output arguments the coordinate matrices are returned; otherwise the surface is drawn and its handle is returned.