Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: finding duplicate entires and removing them
Date: Sat, 31 Jan 2009 00:10:21 +0000 (UTC)
Organization: Battelle Energy Alliance (INL)
Lines: 23
Message-ID: <gm04td$d6d$1@fred.mathworks.com>
References: <glvvv9$350$1@fred.mathworks.com>
Reply-To: <HIDDEN>
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 1233360621 13517 172.30.248.37 (31 Jan 2009 00:10:21 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 31 Jan 2009 00:10:21 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 688530
Xref: news.mathworks.com comp.soft-sys.matlab:515075

One method:

a=[1 34
     2 33
     2 45
     3 32
     4 65
     4 99
     5 11
     1 33
     6 22];

sa = sortrows(a,1);
[idx1,idx1] = unique(sa(:,1),'first');
[idx2,idx2] = unique(sa(:,1),'last');

newa = sa(idx1==idx2,:)





c)]\cf^\dgzhTcjj^5ozg`zpz"zjz\jb]oj\"o`hzd\tiqzpH;@ijk\\``k