outputdata.asv

来自「Matlab psp code is a good operator」· ASV 代码 · 共 18 行

ASV
18
字号
%实时输出结果

%输出当前种群中粒子位置
subplot(1,2,1);
for i=1:popsize
    plot(pop(i,1),pop(i,2),'b*');
    hold on;
end

plot(gbest_x,gbest_y,'r.','markersize',20);axis([-5.12,5.12,-5.12,5.12]);
hold off;

subplot(1,2,2);
axis([0,gen,-0.0005,0.0005]);%axis([xmin,xmax,ymin,ymax])

if exetime-1>0
   line([exetime-1,exetime],[best_in_history(exetime-1),best_fitness]);hold on;
end

⌨️ 快捷键说明

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