Path: news.mathworks.com!newsfeed-00.mathworks.com!panix!newsfeed.stanford.edu!newsfeed.news.ucla.edu!nrc-news.nrc.ca!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: compare two rows, from different matrices
Date: Fri, 8 Feb 2008 16:48:25 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 24
Message-ID: <foi14p$o45$1@canopus.cc.umanitoba.ca>
References: <fohtuq$bog$1@fred.mathworks.com>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1202489305 24709 192.70.172.160 (8 Feb 2008 16:48:25 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Fri, 8 Feb 2008 16:48:25 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:450175


In article <fohtuq$bog$1@fred.mathworks.com>,
Marcel  <JMarcel2@gmail.com> wrote:
>I have a problem with comparing two rows of two differents
>matrices.
>I have matrix A, size is [1024,8]
>the size of matrix B is [7,8]
>Both matrix A and B store only binary numbers. 

>I need to compare every row from A, with each row from B.

>The  row from B that is most similar to 1. row from A, give
>to the 1. row of TEMP 

What test should be used to determine what is "most similar"?
Does it just involve counting the number of positions at which
the contents are the same, or does it involve examining -which-
positions are the same? For example, is 00001111 "more similar"
to 00011110 or to 10001110, or are they the same similarity?
(the two have the same number of positions different, but for
00011110 the 1 has moved four places left and for 10001110
the 1 has moved 7 places left.)
-- 
   "No one has the right to destroy another person's belief by
   demanding empirical evidence."                -- Ann Landers