Path: news.mathworks.com!not-for-mail
From: "Bobba Marco" <bobbaNO@mfn.SPAM.unipmn.it>
Newsgroups: comp.soft-sys.matlab
Subject: Match matrix elements
Date: Tue, 20 Jan 2009 12:09:03 +0000 (UTC)
Organization: University of Eastern Piedmont
Lines: 28
Message-ID: <gl4esv$t3e$1@fred.mathworks.com>
Reply-To: "Bobba Marco" <bobbaNO@mfn.SPAM.unipmn.it>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1232453343 29806 172.30.248.37 (20 Jan 2009 12:09:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 20 Jan 2009 12:09:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 22989
Xref: news.mathworks.com comp.soft-sys.matlab:512674


Hi, I have two matrix A and B:

A = 43000000 x 5
B = 1 x 5

I show an example to clarify the target:

A = [11 22 34 56 89             B = [11 66 44 40 90}
       23 44 11 20 66
       79 54 32 17 89
       11 66 21 45 90
        ... ... ... ... ...]

RESULTS = [1 0 0 0 0
                  0 1 1 0 1
                  0 0 0 0 0
                  1 1 0 0 1
                  .. .. .. .. ..]

I would like to build a matrix (RESULTS) in which appears 1 if an element of B is present in A and zero if not present.
I used "ismember" function but the error HELP OF MEMORY appears.

Can you help me to solve problems in a short time?

Thanks

Marco