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

Home » Public Forums » archive » Re: error with sort
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: error with sort [message #18454 is a reply to message #18447] Mon, 10 January 2000 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
R.Bauer (R.Bauer@fz-juelich.de) writes:

> print,sort([1,1,1,1,1])

I'm pretty sure that no matter how you would
order the sort of these numbers, Reimer, you
would get the same answer. :-)

And, really, that's all these different numbers
are saying. It doesn't matter where you *start*
the sort, when values are the same, the order is
irrelevant. The SORT function is obviously selecting
a random number as the starting point of the sort.
(In other words, to sort something you pick a
number and then the next number is greater than
this number, or less than this number, etc. If the
number happens to be *equal* to the pick. Just
put it here, it's order doesn't matter. That's
what you are seeing in the pattern (or non-pattern)
you are detecting. SORTs are more efficient, in
general I think, when they use random numbers
to pick starting locations.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@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
Read Message
Read Message
Previous Topic: Re: help - sticks plots of u,v/speed direction??
Next Topic: Make TV a function of X?

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

Current Time: Sun Nov 30 23:43:31 PST 2025

Total time taken to generate the page: 1.20044 seconds