sphere 函數開發單位球體的 x-、y- 和 z-coordinates,用於衝浪和網格。
用法
sphere // It generates a sphere consisting of 20-by-20 faces.
sphere(n) // It draws a surf plot of an n-by-n sphere in the current figure.
[X,Y, Z] = sphere(...) // It returns the coordinates of a sphere in three matrices that are (n+1)-by-(n+1) in size.
示例
生成並繪製一個球體。
sphere(20)
axis('square')
or
[x,y,z]=sphere(20);
surf(x, y, z)
axis('square')
輸出:

相關用法
- MATLAB stem3()用法及代碼示例
- MATLAB slice()用法及代碼示例
- MATLAB surf()用法及代碼示例
- MATLAB stem()用法及代碼示例
- MATLAB surfc()用法及代碼示例
- MATLAB meshz()用法及代碼示例
- MATLAB contour()用法及代碼示例
- MATLAB loglog()用法及代碼示例
- MATLAB ribbon()用法及代碼示例
- MATLAB comet()用法及代碼示例
- MATLAB Stairs()用法及代碼示例
- MATLAB pcolor()用法及代碼示例
- MATLAB Bar()用法及代碼示例
- MATLAB contour3()用法及代碼示例
- MATLAB barh()用法及代碼示例
- MATLAB area()用法及代碼示例
- MATLAB waterfall()用法及代碼示例
- MATLAB quiver()用法及代碼示例
- MATLAB Semilogy()用法及代碼示例
- MATLAB plotyy()用法及代碼示例
注:本文由純淨天空篩選整理自 MATLAB sphere()。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。