Info

This question is closed. Reopen it to edit or answer.

hi i hav euclidean distance of top 5 images. testdata1 is excell sheeet havin feature veator of query images and testdata 2 contains 38 db images feature vector ..how i can display top 5 images??

1 view (last 30 days)
b1=xlsread('testdata.xlsx') b=xlsread('testdata2.xlsx') for i=1:38 sum=0; for j=1:9 g = (b(j) - b1(i,j))^2 sum=sum+g end
E_distance = sqrt(sum) %x(i)=sum; distance(i)= E_distance disp('E_distance=') disp(E_distance); end
smallest=min(distance) disp('smallest=') [smallest,I] = min(distance)
answer=sort(distance);
disp('top five images');
for i=1:5
disp(answer(i));
end

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!