📅  最后修改于: 2021-01-07 02:54:18             🧑  作者: Mango
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)
输出: