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 15:46:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <gg1cbq$9gl$1@fred.mathworks.com>
References: <gfvq4u$goe$1@fred.mathworks.com> <gg0304$g8i$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 1227109562 9749 172.30.248.37 (19 Nov 2008 15:46:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 19 Nov 2008 15:46:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1606224
Xref: news.mathworks.com comp.soft-sys.matlab:501748


"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <gg0304$g8i$1@fred.mathworks.com>...
> "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



what inputs doi have to put in accumarray and in histc in the histc help i found this:

N = HISTC(X,EDGES), for vector X, counts the number of values in X
    that fall between the elements in the EDGES vector (which must contain
    monotonically non-decreasing values).  N is a LENGTH(EDGES) vector
    containing these counts. 

what the eges should be???