2022-10-21-matlab一contour,clabel,surf

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,surf)