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

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)



网友评论