📅  最后修改于: 2021-01-07 02:45:53             🧑  作者: Mango
等高线图显示了矩阵Z的等值线。
contour(Z)
contour(Z,n)
contour(Z,v)
contour(X,Y,Z)
contour(X,Y,Z,n)
contour(X,Y,Z,v)
contour(...,LineSpec)
[C,h] = contour(...)
z=-1/2 x^2+xy+y^2
|x|≤5,|y|≤5.
r= -5: .2:5;
[X, Y]=meshgrid (r, r);
Z=-.5*X.^2+X.*Y+Y.^2;
cs= contour (X, Y, Z);
clabel (cs)
输出: