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

📄 outputdata.m

📁 带有收缩因子和惯性权重的基本PSO粒子群算法源代码。本源代码模块化编写
💻 M
字号:
%实时输出结果

%输出当前种群中粒子位置
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([-2,2,-2,2]);
hold off;

subplot(1,2,2);
axis([0,gen,-0.00005,0.00005]);

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

⌨️ 快捷键说明

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