个性化阅读
专注于IT技术分析

MATLAB 3D函数contour3()

outline3生成在矩形网格上定义的曲面的三维轮廓图。

句法

contour3(Z) // It draws a contour plot of matrix Z in a three-dimensional view. Z is interpreted as heights concerning the x-y plane. 
contour3(Z, n) // It draws a contour plot of matrix Z with n contour levels in a three-dimensional view.
contour3(Z, v) // It draws a contour plot of the matrix Z with contour lines at the values specified in vector v. The number of contour levels is similar to length(v). 
contour3(X, Y, Z) // It specifies the x and y coordinates for the values in Z.
contour3(X, Y, Z, n) 
contour3(X, Y, Z, v)
contour3(..., LineSpec) // It draws the contours using the line type and color specified by Line Spec.
[C, h] = contour3(...) // It returns the contour matrix C as described in the function contour c and a column vector containing handles to graphics objects.

例子

3-D等高线图

z=-5/(1+x^2+y^2 )
|x|≤3, |y|≤3.
r=linspace (-3, 3, 50);
[x, y]=meshgrid (r, r);
z= -5./(1+x.^2+y.^2);
contour3 (x, y, z)

输出

MATLAB 3D函数contour3()

赞(0)
未经允许不得转载:srcmini » MATLAB 3D函数contour3()

评论 抢沙发

评论前必须登录!