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

📄 normdistance.sci

📁 基于SCILAB的The Genetic Algorithm Toolbox for SCILAB (GATS)工具箱
💻 SCI
字号:
function [distance] = normDistance(Pop1,Pop2,bounds,options)

if ( options(1)==1 )     // Float ga
    n=size(Pop1,2) -1;   // Variables' number
    ndis=((Pop1(1:n) - Pop2(1:n))'./(bounds(:,1) - bounds(:,2))).^2;
    distance = sqrt(sum(ndis)/n);
else
    n=size(Pop1,2) -1 ;  // Variables' number
    distance=(sum(abs(Pop1(1:n) - Pop2(1:n)))/n);
end;

    

⌨️ 快捷键说明

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