updateu.m

来自「模糊核聚类算法的几篇论文及matlab源码」· M 代码 · 共 18 行

M
18
字号
function fun=updateU(x,v,m,c)

n=length(x);
for i=1:c

    for k=1:n
          tempU=0;
          tempD=0;
%           tempU= (1/distance(x(:,k),v(:,i)))^(2*(m-1));
            for p=1:c
               tempD=tempD+ (distance(x(:,k),v(:,i))/distance(x(:,k),v(:,p)))^(2*(m-1));
%                tempD=tempD+ (kernal(x(:,k),v(:,i))/kernal(x(:,k),v(:,p)))^(2*(m-1));               
            end
            u1(i,k)=1/tempD;  

    end
end
fun=u1;

⌨️ 快捷键说明

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