[x,y]=meshgrid(-2:0.1:2,-1:0.1:3);
z=100*(y-x.^2).^2+(1-x).^2;
figure(1);
mesh(x,y,z)
figure(2);
contour(x,y,z,20)
drawnow
hold on
plot(-1.2,2,'o');
text(-1.2,2,'start point')
plot(1,1,'o')
text(1,1,'solution')<i
MATLAB源代码-规划问题.zip
版权申诉
32 浏览量
2023-08-27
23:34:00
上传
评论
收藏 120KB ZIP 举报
![avatar](https://profile-avatar.csdnimg.cn/ace77722cc904668be9c7ee0feb247ba_dwf1354046363.jpg!1)
![avatar-vip](https://csdnimg.cn/release/downloadcmsfe/public/img/user-vip.1c89f3c5.png)
易小侠
- 粉丝: 6518
- 资源: 9万+