Path: news.mathworks.com!not-for-mail
From: "gozer " <wolfeb@timken.com>
Newsgroups: comp.soft-sys.matlab
Subject: Stumped on a Matrix Analysis
Date: Wed, 25 Nov 2009 12:12:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 2
Message-ID: <hej6uj$hqq$1@fred.mathworks.com>
Reply-To: "gozer " <wolfeb@timken.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 1259151123 18266 172.30.248.35 (25 Nov 2009 12:12:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 25 Nov 2009 12:12:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2109650
Xref: news.mathworks.com comp.soft-sys.matlab:587741


I am a novice and stumped with what may be a simple problem but not sure how to attack.  I have a matrix A=m x n and a smaller matrix filterA=[2:6,21,34,35:43].  I would like to return a matrix B that contains all rows of A whose value in col 'n'  matches a value in filterA.
I have looked at 'filter', 'sort', sortrows, 'ismember' and others but none seem to be the right thing.  Even tried multiple if-thens but that got messy quickly.