📄 inclassdistance.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -