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

📄 griewank.m

📁 matlab的微粒群算法
💻 M
字号:
%The Griewank function for use with the psotoolbox
%
% Function Description:
% Equation -> sum(((x(i).^2) / 4000)')' - prod(cos(x(i) ./ sqrt(i))')' + 1
%      xmin  = [0, 0, 0.....0]  (all zeroes)
%      fxmin = 0                  (zero)
function Gred = Griewank(Swarm);
[SwarmSize, Dim] = size(Swarm);
indices = repmat(1:Dim, SwarmSize, 1);
Gred = sum(((Swarm.^2) / 4000)')' - prod(cos(Swarm ./ sqrt(indices))')' + 1;


⌨️ 快捷键说明

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