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

📄 fcm_calcu.m

📁 every function has its own help which can be obtained by typing "help name" where "name" is the fu
💻 M
字号:
function Umat = fcm_calcU(mfuz,Dmat);
%   function Umat = fcm_calcU(mfuz,Dmat);
%
%   Compute the partition matrix using matrix of distances
%
%   mfuz = fuzzy parameter (> 1)
%   Dmat = matrix of distances of size (K,N)
%   Umat = fuzzy partition matrix of size (K,N)
%
%   write by : DD
%       date : 2001/05/07
%      modif : 2001/06/27

[K,N] = size(Dmat);
for r=1:N
    cardIr = 0;
    for s=1:K
        if (Dmat(s,r) == 0.0)   cardIr = cardIr+1; end
    end
    if (cardIr == 0)
        for s=1:K
            nume = Dmat(s,r);
            deno = (nume./Dmat(:,r)).^(1/(mfuz-1));
            Umat(s,r) = 1.0/sum(deno);
        end    
    else
       for s=1:K
           if (Dmat(s,r) == 0.0)
               Umat(s,r) = 1.0/cardIr;
           else
               Umat(s,r)= 0.0;
           end
       end
    end
end
return %% end of function fcm_calcU.m

⌨️ 快捷键说明

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