?? minhausdorff.m
字號(hào):
function distance=minHausdorff(Bag1,Bag2)
% minHausdorff Compute the minimum Hausdorff distance between two bags Bag1 and Bag2
% minHausdorff takes,
% Bag1 - one bag of instances
% Bag2 - the other bag of instanes
% and returns,
% distance - the minimum Hausdorff distance between Bag1 and Bag2
size1=size(Bag1);
size2=size(Bag2);
line_num1=size1(1);
line_num2=size2(1);
dist=zeros(line_num1,line_num2);
for i=1:line_num1
for j=1:line_num2
dist(i,j)=sqrt(sum((Bag1(i,:)-Bag2(j,:)).^2));
end
end
distance=min(min(dist));
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -