inclassdistance.m

来自「模式识别中的isodata算法」· M 代码 · 共 8 行

M
8
字号
function s=inclassdistance(x,y)
% x is the center[cx cy]
% y is matrix of element in the class[x1 y1; x2 y2; ...]

% square distances
d2=(y(:,1)-x(1)).^2+(y(:,2)-x(2)).^2;
s=sum(sqrt(d2))/length(y(:,1));
%%%Author: Feng Shuo%%%%%%%%

⌨️ 快捷键说明

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