Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how many times repeat a number in an array??
Date: Wed, 19 Nov 2008 04:00:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 9
Message-ID: <gg0304$g8i$1@fred.mathworks.com>
References: <gfvq4u$goe$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 1227067204 16658 172.30.248.37 (19 Nov 2008 04:00:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 19 Nov 2008 04:00:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:501639


"Maria " <mariaki16@hotmail.com> wrote in message <gfvq4u$goe$1@fred.mathworks.com>...
> i have a function that gets from the user a random Array.by using the unique function i have a unique list with the arguments of the vector.with out using loop how do i find the times which a number is repeat in the array
> 
> Any help??

  An alternative and possbily superior hint is to use the third output argument of 'unique' in the 'accumarray' function rather than doing 'histc'.  This has the advantage of requiring only one sort operation altogether.

Roger Stafford