フィルターのクリア

distance between two matrices

2 ビュー (過去 30 日間)
madhuri sachane
madhuri sachane 2012 年 5 月 18 日
コメント済み: sweta singh 2014 年 9 月 9 日
I have to compute the hamming distance between two matrices.
a=[240*7]; b=[240*7]; dist=hamming (a,b);
but this code shows error.
what i do? I need the solution.

採用された回答

Junaid
Junaid 2012 年 5 月 18 日
hamming is not for hamming distance I guess. What is the type of input you want to compute the hamming distance.
Hamming distance is usually calculated between character array or binary array. For binary array it is very simple and straight forward.
For binary array sum of absolute difference can give you hamming distance.
For example.
a = [1 0 0 1];
b = [1 1 1 1];
h_d = sum(abs(a-b));
  1 件のコメント
sweta singh
sweta singh 2014 年 9 月 9 日
What if i have to find the hamming distance between two rows of a binary array?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeHamming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by