From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: quick search of a binary array within a binary matrix.
Date: Tue, 31 May 2011 01:40:05 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 15
Message-ID: <is1gtl$ao4$>
References: <is0oum$e82$> <> <is0uio$r70$> <is168a$fk2$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1306806005 11012 (31 May 2011 01:40:05 GMT)
NNTP-Posting-Date: Tue, 31 May 2011 01:40:05 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:729395

"Roger Stafford" wrote in message <is168a$fk2$>...
> ..........
>   One thing is certain.  The code
> tmp=find(b*B'==sum(b));
> will not get the answer you seem to be asking for by an conceivable stretch of the imagination.
> Roger Stafford
- - - - - - - - -
  It has occurred to me that by "b is contained in B" you might have meant that at least one of the rows of B (after being converted to a matrix) has the property that each of its binary bits is a 1 wherever the corresponding b vector has a 1 - that is, that a 1 denotes membership in the set of possible columns indices - rather than that the two rows are bit-for-bit equal.  If the former was your meaning of 'contained in', then the matrix multiplication you mentioned would indeed work properly.

  My comment about that is twofold.  I think you should have used a better way of wording your problem than just "contained in", and I needed a greater "stretch of the imagination".

Roger Stafford