Path: news.mathworks.com!not-for-mail
From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: help with unique function
Date: Wed, 5 May 2010 21:09:04 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 16
Message-ID: <hrsmpg$kv0$1@fred.mathworks.com>
References: <hrrgbg$mk0$1@fred.mathworks.com> <hrsba0$bj3$1@fred.mathworks.com> <hrsdhq$b4u$1@fred.mathworks.com> <hrslk1$4kq$1@fred.mathworks.com>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1273093744 21472 172.30.248.37 (5 May 2010 21:09:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 5 May 2010 21:09:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: news.mathworks.com comp.soft-sys.matlab:632942

"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <hrslk1$4kq$1@fred.mathworks.com>...
> "Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <hrsdhq$b4u$1@fred.mathworks.com>...
> > Hm, Unless if I'm mistaken I can't see why the advantage above to this:
> > 
> >  [ax,ax]=unique(a(:,2),'first');
> >  r=a(ax,:)
> > .......
> 
>   Hey, Bruno, that's equivalent to what I wrote earlier with
> 
>  [t,m,n] = unique(a(:,2),'first');
>  b = a(m,:);

Quite right Roger, this equivalence is clear with 'clear n t'. Ins't clear? LOL

Bruno