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

Home » Public Forums » archive » Re: Speed-up of code
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: Speed-up of code [message #67858 is a reply to message #67857] Tue, 25 August 2009 09:12 Go to previous messageGo to previous message
philipelson is currently offline  philipelson
Messages: 9
Registered: March 2009
Junior Member
> h = HISTOGRAM(day, REVERSE_INDICES=ri)
> nh = N_ELEMENTS(h)
> sortData = value[ri[nh+1:*]]
> totSortData = [0., TOTAL(sortData, /CUMULATIVE)]
> vec8 = totSortData[ri[1:nh]-nh-1] - $
> totSortData[ri[0:nh-1]-nh-1]
> print,vec8/h ;May need to check for zero values first


Aha! Thank you all very much!

If I was to extend this further, any suggestions on the obtaining the
maximum rather than the average of each bin?

This would indeed provide some nice examples of gathering basic
statistics using the histogram function!

Many Thanks,

Philip
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Histogram Too Many Array Elements
Next Topic: Re: Digits in IDL

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

Current Time: Fri Oct 10 22:56:21 PDT 2025

Total time taken to generate the page: 0.05503 seconds