如何设置轮廓matlab的范围

How to set range for contour matlab

据我所知,我可以设置轮廓线的数量,但它们会从最小值到最大值(例如,从 0.4 到 2.3)均匀分布。如何使用步长 0.04 将等高线的范围设置为 0.54 到 1.7?

我就是这样使用那个函数的contour(x,y,po,20,'LineColor',[0 0 0]);

将要绘制等高线的实际级别指定为 fourth input argument 而不是等高线的数量。

contour(x, y, po, 0.54:0.04:1.7, 'LineColor', [0 0 0])

contour(X,Y,Z,v) draws a contour plot of matrix Z with contour lines at the data values specified in the monotonically increasing vector v