瀑布函数绘制一个与 meshz 函数相等的网格,但它不会从矩阵的列中生成线。
用法
waterfall(Z) // It creates a waterfall plot using x = 1:size(Z,1) and y = 1:size(Z,1). Z determines the color, so the color is proportional to surface height.
waterfall(X,Y,Z) // It generates a waterfall plot using the values specified in X, Y, and Z. Z also defining the color, so the color is proportional to the surface height. If X and Y are vector, X corresponds to the columns of Z, and Y correspond to the rows, where the length(x) = n, length(y) = m, and [m, n] = size(Z).
waterfall(...,C) // It uses scaled color values to obtain colors from a current colormap. Color scaling is defined by the range of C, which must be the same size as Z.
h = waterfall(...) // It returns the handle of the patch graphics object used to draw the plot.
示例
z=-5/(1+x^2+y^2 )
|x|â¤3,|y|â¤3
x=linspace (-3, 3, 50);
y=x;
[x, y] = meshgrid(x, y);
z=-5. / (1+x. ^2+y. ^2);
waterfall(z)
hidden off
输出:
相关用法
- MATLAB meshz()用法及代码示例
- MATLAB contour()用法及代码示例
- MATLAB loglog()用法及代码示例
- MATLAB ribbon()用法及代码示例
- MATLAB comet()用法及代码示例
- MATLAB Stairs()用法及代码示例
- MATLAB pcolor()用法及代码示例
- MATLAB Bar()用法及代码示例
- MATLAB contour3()用法及代码示例
- MATLAB barh()用法及代码示例
- MATLAB area()用法及代码示例
- MATLAB stem3()用法及代码示例
- MATLAB quiver()用法及代码示例
- MATLAB slice()用法及代码示例
- MATLAB Semilogy()用法及代码示例
- MATLAB plotyy()用法及代码示例
- MATLAB fill3()用法及代码示例
- MATLAB fill()用法及代码示例
- MATLAB cylinder()用法及代码示例
- MATLAB ellipsoid()用法及代码示例
注:本文由纯净天空筛选整理自 MATLAB waterfall()。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。