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

Home » Public Forums » archive » Re: Fast Implementation
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: Fast Implementation [message #31413 is a reply to message #31412] Fri, 05 July 2002 10:06 Go to previous messageGo to previous message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
David, I envy you. Your busy time ended in 44 minutes (10:22 first post,
11:06 the second). Obviously, you need to help me with that foundation
now :-)
Cheers,
Pavel

David Fanning wrote:
>
> David Fanning (david@dfanning.com) writes:
>
>> If you normalize your quadrant to 1, and take a bin size
>> of 0.5, then a Histogram would give you the answer in, oh,
>> 0.00005 seconds. :-)
>
> Sorry, I was busy before. Here is an example of what I
> mean:
>
> ***********************************************
> PRO Example
>
> ; Find out how many points are in each quadrant
> ; of a 2D space given by the max and min of the
> ; data.
>
> x = (randomu(seed, 1000) - 0.5) * 100
> y = (randomu(seed, 1000) - 0.5) * 100
> Plot, x, y, /NoData
> Oplot, x, y, Psym=4
>
> xx = Scale_Vector(x, 0, 0.9999999)
> yy = Scale_Vector(y, 0, 0.9999999)
> result = Hist_2D(xx, yy, Bin1 = 0.5, Bin2=0.5, $
> Min1=0, Max1=1.0, Min2=0, Max2=1.0)
> print, result[0:1, 0:1]
> END
> *************************************************
>
> You can find the Scale_Vector program on my web page:
>
> http://www.dfanning.com/programs/scale_vector.pro
>
> Cheers,
>
> David
>
> --
> David W. Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Phone: 970-221-0438, E-mail: david@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: making an 3d oblique plane a volume (was structure use)
Next Topic: Re: map projection question

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

Current Time: Fri Oct 10 07:10:39 PDT 2025

Total time taken to generate the page: 2.00317 seconds