小小知识点(四)——MATLAB如何画等高线图和线性规划约束方程

  MATLAB程序:

figure
contourf(x,y,data) % 画等高线
hold on
plot(x,y(x)) %画线性规划约束方程1
hold on 
plot(y,x(y)) %画线性规划约束方程2
axis([xmin xmax ymin ymax]) %设置坐标轴的范围

  

猜你喜欢

转载自www.cnblogs.com/weinapang/p/10583197.html
今日推荐