From: "Bruno Luong" <b.luong@fogale.findmycountry>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Getting indexes of rows of matrix with more than n repetitions
Date: Wed, 6 Jan 2010 07:19:06 +0000 (UTC)
Organization: FOGALE nanotech
Lines: 13
Message-ID: <hi1dha$8mu$>
References: <hhudae$4p$> <hhuths$led$> <hi023t$mtq$> <hi0kgl$c56$>
Reply-To: "Bruno Luong" <b.luong@fogale.findmycountry>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1262762346 8926 (6 Jan 2010 07:19:06 GMT)
NNTP-Posting-Date: Wed, 6 Jan 2010 07:19:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 390839
Xref: comp.soft-sys.matlab:596783

"Jan Simon" <> wrote in message <hi0kgl$c56$>...
unning the method posted by us:
>   v2 = v(:,1) + 17 * v(:, 2);
> Then UNIQUE does not need the 'rows' flag and sorting might become faster.
> There is some potential in us' method: UNIQUE and ISMEMBER sort their input (and perhaps HISTC does also?). So it would be faster to sort the large array once and operate with the sorted index.


HISCT is a dichotomy insertion method, which would be O(N*log(M)) in complexity where N and M are respectively the number of data and edges. So HISTC is faster than SORT when M<N in theory.
A better way for large array is ACCUMARRAY, see a thread here: