how pdist2 works
Ältere Kommentare anzeigen
I have two mat files, template1_1.mat and template1_2.mat.
template1_1.mat :
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1
0 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1
0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 1
template1_2.mat:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0
0 1 0 0 0 1 1 1 1 1 1 1 0 1 1 1 1 1 0
0 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 1 1 1 0 1 1 1 0 1 1 1 1 1 1 1 1 1 1
When I calculate hamming distance between these two files using this code:
HD = pdist2(template1_1,template1_2,'hamming');
Then the output is 0.0057
Can anyone explain to me how it works? Thank in advance!
Antworten (0)
Kategorien
Mehr zu Hamming finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!