Path: news.mathworks.com!not-for-mail
From: "Pr B" <pb2297@columbia.edu>
Newsgroups: comp.soft-sys.matlab
Subject: deleting specific rows
Date: Fri, 16 Jan 2009 05:32:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <gkp64i$jeu$1@fred.mathworks.com>
Reply-To: "Pr B" <pb2297@columbia.edu>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1232083922 19934 172.30.248.38 (16 Jan 2009 05:32:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 16 Jan 2009 05:32:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1448256
Xref: news.mathworks.com comp.soft-sys.matlab:511940

hi all,

i have a list of numbers as follows (list1):

22
26
51
4
740
...

and a two column list of numbers as follows (list2):

1     13
4     9
22   26
33   740
55 1234

the task i want to accomplish is as follows:
if a number from list1 is found in a row in list2, i would like to remove that row from list2.  in the above example the numbers 22, 26, 4, and 740 are found in both columns of list2 and i would like to remove rows 2, 3, and 4 of list2.  how would i do this in a short matlab script?

thanks!