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

Home » Public Forums » archive » Re: hist_norm
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: hist_norm [message #73314 is a reply to message #73310] Tue, 02 November 2010 22:00 Go to previous messageGo to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Nov 2, 9:28 pm, le.dav...@tiscali.it wrote:
> Hi folks,
> I am trying to use "hist_norm.pro" in a code like that (my first
> time):
>
> pro istog, howmanyt
>
>   t = fltarr(howmanyt)
>   N = 20.
>   for k=0, howmanyt-1, 1 do begin
>       t[k] = total(randomu(seed, N))
>   endfor
>
>   a = intarr(howmanyt) + 1
>   hist_norm, t, condition = a
> end
>
> I can't figure out why it does not work. Can you help me?
> Thanks in advance.

On an unrelated note, because my IDL optimization neurons cringe at
unnecessary for loops, you might want to replace the first part of
that with:

N = 20L
t = rebin(randomu(seed, N*howmanyt), howmanyt) * N

Whether that makes any difference depends on how large howmanyt is.

-Jeremy.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to change dialog_message button names ?
Next Topic: Overplot behalfs strange

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

Current Time: Fri Oct 10 15:02:56 PDT 2025

Total time taken to generate the page: 0.79780 seconds