Path: news.mathworks.com!not-for-mail
From: "Marcel " <JMarcel2@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: compare two rows, from different matrices
Date: Fri, 8 Feb 2008 15:54:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 47
Message-ID: <fohtuq$bog$1@fred.mathworks.com>
Reply-To: "Marcel " <JMarcel2@gmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1202486042 12048 172.30.248.35 (8 Feb 2008 15:54:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 8 Feb 2008 15:54:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 492810
Xref: news.mathworks.com comp.soft-sys.matlab:450160


Hello 


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.
For example :
1.row from A compare with 1. row from B
                then with 2.row from B
                      ..
                      ..
                     with 7. row from B

then make another matrix TEMP with size [1024,8]
The  row from B that is most similar to 1. row from A, give
to the 1. row of TEMP 


2.row from A compare with 1. row from B
                then with 2.row from B
                      ..
                      ..
                     with 7. row from B
The  row from B that is most similar to 2. row from A, give
to the 2. row of TEMP
..
..
..
..
1024.row from A compare with 1. row from B
                   then with 2.row from B
                        ..
                        ..
                        with 7. row from B
The  row from B that is most similar to 1024. row from A,
give to the 1024. row of TEMP

so I should have a new matrix TEMP , which contains from B rows
 Can somoen help me, I have own script, but he just compare
all elements from A with 1. row from B
Thank you