matlab等高线图具体值
matlab contour plot specific value
我在 matlab 中绘制了等高线图(见代码)。我想找到值等于 1 的等高线。现在我只是发现它大约介于线等高线图之间:
这可以做到吗?例如,如果我想绘制从值 0 到 1
的 5 条等高线
更新我设法绘制等于 1 的等高线,但我希望等高线在内部,而不是等高线外部 =1,因为我使用此代码获得。
[x,y] = meshgrid(-3 : 0.01: 3, -3 : 0.01: 3);
s = x + i*y;
z=abs(1+s+((s.^2)/2)+((s.^3)/6));
figure;
[C,h] = contour(x,y,z,[1 1]);
clabel(C,h)
hold on;
[R,k] = contour(x,y,z,25);
clabel(R,k)
怎么样:
[C,h] = contour(x,y,z,0.1:0.1:1);
clabel(C,h)
% no need for 'hold on' and all the rest...
这就是你要找的?
我在 matlab 中绘制了等高线图(见代码)。我想找到值等于 1 的等高线。现在我只是发现它大约介于线等高线图之间:
更新我设法绘制等于 1 的等高线,但我希望等高线在内部,而不是等高线外部 =1,因为我使用此代码获得。
[x,y] = meshgrid(-3 : 0.01: 3, -3 : 0.01: 3);
s = x + i*y;
z=abs(1+s+((s.^2)/2)+((s.^3)/6));
figure;
[C,h] = contour(x,y,z,[1 1]);
clabel(C,h)
hold on;
[R,k] = contour(x,y,z,25);
clabel(R,k)
怎么样:
[C,h] = contour(x,y,z,0.1:0.1:1);
clabel(C,h)
% no need for 'hold on' and all the rest...
这就是你要找的?