|
Hi Dani,
will this help you better ?
----------
%for vectors a and b
hamming_dist(a,b) = sum(a~=b)
cheers,
aditya
Dani Camps wrote:
>
>
> I think that the hamming distance of two vectors is the number of
different
> components that thy have, I've been looking for this function in
matlab 6.0
> R12 but it does not appear, does somebody know sth about this
function?
>
> I know that it's easy to implement it using a for loop but I'm sure
that
> the
> matlab's function will be more efficient than mine.
>
> Thanks in advance
>
>
>
|