comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: There is NO TRUTH! Re: Histogram Hot-shots Required
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: There is NO TRUTH! Re: Histogram Hot-shots Required [message #16346] Tue, 20 July 1999 00:00 Go to previous message
eddie haskell is currently offline  eddie haskell
Messages: 29
Registered: September 1998
Junior Member
David Fanning wrote:

> More evidence that the apocalypse is upon us....
<snip>
> ; Liam's method 1:
> binNum1 = FLOOR((value - Min(array)) / binsize)
>
> ; Eddie's method:
> binNum4 =(where(R ge ((where(((where(array eq value))[0]) eq $
> R[R[0]:*]))[0]+R[0])))[0]

Well this had me confused for a bit. I admit I came up with this method
friday evening sitting in a local pub drinking lager but it seemed it
should have been fool proof as all the information was given and no
rounding of any kind needed to be done. After doing a quick check I
realised I had made a slight omission in my thinking and forgot about
the possiblity of cells with zero elements (shows what drinking can do
to those brain cells). If I change the GE in my method to GT and
subtract 1 off the end, this method then seems to produce the same
results as Liam's solution and your brute force method, i.e.:

binNum6 =(where(R GT ((where(((where(array eq value))[0]) eq $
R[R[0]:*]))[0]+R[0])))[0]-1

I admit this looks much more messy than Liam's solution and probably
takes longer to execute but I wanted to correct my mistake just for
completeness. I am glad that you solved your problem and also wonder
what the original error in the histogram function was.

Cheers,
eddie

----- ---- --- --- ---- --- -- --- --- -- -- - - - -
|\ A G Edward Haskell
|\ Center for Coastal Physical Oceanography
|\ Old Dominion University, Norfolk VA 23529
|\ Voice 757.683.4816 Fax 757.683.5550
|\ e-mail haskell*ccpo.odu.edu
----- ---- --- ---- --- --- --- --- -- -- -- - - - -
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Seeking IDL Programmers with Interests in Coastal Oceanography/Geology
Next Topic: Re: CALL_EXTERNAL failure.

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 02:16:23 PDT 2025

Total time taken to generate the page: 1.51911 seconds