compsupergaps.m

来自「Passino所提出的细菌优化算法matlab源程序」· M 代码 · 共 14 行

M
14
字号
function supergaps = compsupergaps(gaps)
% Computes the angular difference between two consecutive gaps

global N supergaps

for i = 1: N
    if i == 1       %This handles the case for the computation of the gap of the Nth frog
        supergaps(i) = gaps(i)+gaps(N);
    else
        supergaps(i) = gaps(i)+gaps(i-1);
    end
    
end
return

⌨️ 快捷键说明

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