資源簡介
粒子群算法matlab工具箱
代碼片段和文件信息
%DrawSwarm?>>?Internal?function?of?psotoolbox.
%?Purpose:?To?draw?a?visual?display?of?the?Swarm.
%?
%?You?shouldn‘t?need?to?mess?around?with?this?fn.?if?u?don‘t?wanna?change?the?visualization.
%?
%?see?also:?pso.m
%
function?DrawSwarm(Swarm?SwarmSize?Generation?Dimensions?GBest?vizAxes)
X?=?Swarm‘;
if?Dimensions?>=?3
????set(vizAxes‘XData‘X(1?:)‘YData‘?X(2:)?‘ZData‘?X(3:));
elseif?Dimensions?==?2
????set(vizAxes‘XData‘X(1?:)‘YData‘?X(2:));
end
GenDiv?=?100;
xAx?=?GBest(1);
yAx?=?GBest(2);
zAx?=?GBest(2);
zf?=?100?*?50/Generation;?%zoom?factor
if?rem(Generation?GenDiv)?==?0
????axis([xAx-zf?xAx+100?yAx-zf?yAx+zf?zAx-zf?zAx+zf]);
end
title(Generation);
drawnow;
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????490??2004-05-30?12:23??psotb-beta-0.3\ChangeLog.txt
?????文件????????721??2003-07-10?02:07??psotb-beta-0.3\DrawSwarm.m
?????文件????????297??2003-07-10?02:27??psotb-beta-0.3\functions\DeJong.m
?????文件????????433??2003-07-10?02:26??psotb-beta-0.3\functions\Griewank.m
?????文件????????373??2003-07-10?02:19??psotb-beta-0.3\functions\Rastrigrin.m
?????文件????????531??2003-07-14?17:28??psotb-beta-0.3\functions\Rosenbrock.m
????..AD...?????????0??2005-12-29?22:16??psotb-beta-0.3\functions
?????文件???????9814??2003-07-10?02:04??psotb-beta-0.3\get_psoOptions.m
?????文件??????69746??2003-07-13?01:24??psotb-beta-0.3\installation-help.pdf
?????文件???????7583??2004-05-30?12:14??psotb-beta-0.3\pso.m
?????文件????????368??2003-07-14?18:02??psotb-beta-0.3\Readme.txt
?????文件???????7478??2003-07-14?18:01??psotb-beta-0.3\RunExp.m
?????文件???????1705??2003-07-10?02:05??psotb-beta-0.3\show_psoOptions.m
?????目錄??????????0??2004-05-30?12:12??psotb-beta-0.3
-----------?---------??----------?-----??----
????????????????99539????????????????????14
- 上一篇:MATLAB音頻信號的分析與合成程序
- 下一篇:小波神經網絡Matlab交通仿真程序
評論
共有 條評論