圆柱体创建单位圆柱体的 x、y 和 z 坐标。我们可以使用 surf 或 mesh 绘制圆柱形对象,或者通过不提供输出参数来立即绘制它。
用法
[X, Y, Z] = cylinder // It returns the x, y, and z coordinates of a cylinder with a radius similar to 1. The cylinder has 20 similar spaced points around its circumference.
[X, Y, Z] = cylinder(r) // It returns the x, y, and z coordinates of a cylinder using r to describe a profile curve. cylinder treats each component in r as a radius at equally spaced heights along with the unit height of the cylinder.
[X,Y,Z] = cylinder(r,n) // It returns the x, y, and z coordinates of a cylinder based on the profile curve described by vector r. The cylinder has n similar spaced points around its circumference.
cylinder(...) // with no output arguments, plot the cylinder using MATLAB surf.
示例
r=sin?(3π z)+2
0≤z≤1,0≤θ≤2θ
z=[0:.02:1]';
r=sin(3*pi*z)+2;
cyclinder(r), axis square
输出:
相关用法
- MATLAB contour()用法及代码示例
- MATLAB comet()用法及代码示例
- MATLAB contour3()用法及代码示例
- MATLAB compass()用法及代码示例
- MATLAB meshz()用法及代码示例
- MATLAB loglog()用法及代码示例
- MATLAB ribbon()用法及代码示例
- MATLAB Stairs()用法及代码示例
- MATLAB pcolor()用法及代码示例
- MATLAB Bar()用法及代码示例
- MATLAB barh()用法及代码示例
- MATLAB area()用法及代码示例
- MATLAB stem3()用法及代码示例
- MATLAB waterfall()用法及代码示例
- MATLAB quiver()用法及代码示例
- MATLAB slice()用法及代码示例
- MATLAB Semilogy()用法及代码示例
- MATLAB plotyy()用法及代码示例
- MATLAB fill3()用法及代码示例
- MATLAB fill()用法及代码示例
注:本文由纯净天空筛选整理自 MATLAB cylinder()。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。