⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 xplt.m

📁 Differential Evolution (matlab)
💻 M
字号:
function out = xplt(NP,pop,vec,flag)% xplt plots a coloured point with coordinates vec(1), vec(2)% on a 3D-surface if flag is not equal 0. Otherwise NP colored% points, stored in pop, will be plotted.%% Example: xplt(NP,pop)%          where pop is a two-dimensional array of NP points% %% Used by: der.mif (flag == 0)         %---draw entire population----------  for i=1:NP    x1=pop(i,1);    x2=pop(i,2);    z1=100*(x2-x1.^2).^2+(1-x1).^2;    plot3(x1,x2,z1,'r.', ...	'EraseMode','none', ...	'MarkerSize',15);    drawnow; %---Draws current graph now    out = [];  endelse  x1 = vec(1);  x2 = vec(2);  z1=100*(x2-x1.^2).^2+(1-x1).^2;  plot3(x1,x2,z1,'r.', ...      'EraseMode','none', ...      'MarkerSize',15);  drawnow; %---Draws current graph now  out = [];end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -