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

📄 calfitness.m

📁 粒子群优化程序
💻 M
字号:
% =====================================================================
%                 calfitness: sub-algorithm of pso
%         Start Date: 2006/9/1
%   Last Changed: 2006/11/20
%    Specification: MATLAB 7.01 Programing
%                           This is the subprogram of PSO algorithm, it is
%                           used to calculate the fitness of the particle,
%                           here, it is the value of function rosenbrock
%
% Copyright (c) Ji and Liao in 2006
% All rights Reserved
%==========================================================================

 % rosenbrock
 elise=particle(:,:,IndexIteration);
          x0=elise(:,1:end-1);
 x1=elise(:,2:end);

 out = sum( (100*(x1-x0.^2).^2 + (x0-1).^2) , 2);
 fitness(:,IndexIteration)=abs(out-denstination);

⌨️ 快捷键说明

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