[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems with 'HISTOGRAM'
In article <376107F3.DA94ABC5@users.whh.wau.nl>,
Martin Vissers <martin.vissers@users.whh.wau.nl> wrote:
>Dear newsreaders
>
>I have a problem with the IDL fuction histogram.
>I'm running IDL 5.0.3a on windows NT4.0 (sp5)
>
>If I make the following histogram:
>
>aa=histogram(dindgen(330)-180.0d,min=-180.0d,max=180.0d,binsize=10.0d)
>
>the array aa has 37 elements:
>AA LONG = Array[37]
>
>but it should have 36 elements ??????
>
There are 361 numbers between -180 and 180, inclusive. So 361/binsize=
36.1 which gets rounded up to 37.
--Mike
--
--
Michael Chinander University of Chicago
m-chinander@uchicago.edu (773)702-1446 (Voice) (773)702-0371 (Fax)