unc_n2_shubert1plot.m
来自「it contains many classic Test Problems f」· M 代码 · 共 36 行
M
36 行
lb=-10;
ub=10;
teix=0.05;
[X,Y] = meshgrid(lb:teix:ub,lb:teix:ub);
%get Z;
a=1.42513;
b=0.80032;
suma=0;
for i=1:5
suma=suma+i*cos((i+1)*X+i);
end
sumb=0;
for i=1:5
sumb=sumb+i*cos((i+1)*Y+i);
end
Z=suma.*sumb;
% %% mesh
mesh(X,Y,Z)
axis([lb ub lb ub -200 200]);
title('unc#n2#shubert1');
xlabel('x');
ylabel('y');
zlabel('z')
% % %contour
% %
% v=[ -186 -160 -100 -60 -10 0 60 100 ];
% [c,h]=contour(X,Y,Z,v);
% clabel(c,h);
% title('unc#n2#shubert1');
% xlabel('x');
% ylabel('y');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?