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

📄 goplotpso.m

📁 智能优化算法: 粒子群优化算法(PSO)应用于神经网络优化程序。分为无隐含层、一隐含层、二隐含层。运行DemoTrainPSO.m即可。 程序来自:Brian Birge NCSU
💻 M
字号:
% goplotpso.m
% simple graphing prog for use with tpso1,2,3
%
% Brian Birge
% Rev 1.0
% 1/1/3

    subplot(2,1,1)
     semilogy(1:te,tr(1:end-1)),xlabel('epoch');,ylabel('gbest');
     title(['mv=',num2str(mv),' inertia wt=',num2str(iwt(i)),', ',num2str(D),' dimensions, GbestVal= ',num2str(gbestval,10)]);            
     hold on
     semilogy(1:te,ones(size(1:te))*eg,'r-.');
     hold off
     drawnow
    subplot(2,1,2)
     plot(pos(:,1),pos(:,D),'b.')
     hold on
     plot(pbest(:,1),pbest(:,D),'y.');
     xlabel('pos dim 1');
     ylabel(['pos dim ',num2str(D)]);
     grid on
     plot(gbest(1),gbest(D),'r*');    
     hold off
     axis([-10 10 -10 10]);
     drawnow     
%    subplot(2,2,4)
%     plot(vel(:,1),vel(:,D),'b.');
%     xlabel('vel dim 1');
%     ylabel(['vel dim ',num2str(D)]);
%     grid on
%     hold on
%     plot(vel(idx1,1),vel(idx1,D),'r*');
%     hold off
%     drawnow 

⌨️ 快捷键说明

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