美文网首页
2022-10-21-matlab一contour,clabel

2022-10-21-matlab一contour,clabel

作者: 思求彼得赵 | 来源:发表于2022-10-21 23:07 被阅读0次

Beck, Amir. Introduction to nonlinear optimization: Theory, algorithms, and applications with MATLAB. Society for Industrial and Applied Mathematics, 2014. P15

image.png
clear
[x,y]=meshgrid(-8:0.05:8,-8:0.05:8);
z=(x+y)./(x.^2+y.^2+1);
mesh(x,y,z)
figure
surf(x,y,z)
shading interp
figure;
h=contour(x,y,z,10);
clabel(h)
figure;
contourf(x,y,z,20);
colormap(hot)

image.png image.png image.png

相关文章

网友评论

      本文标题:2022-10-21-matlab一contour,clabel

      本文链接:https://www.haomeiwen.com/subject/omfvzrtx.html