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

Home » Public Forums » archive » Re: Sort and Where
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Sort and Where [message #20489] Fri, 30 June 2000 00:00
Simon de Vet is currently offline  Simon de Vet
Messages: 36
Registered: May 2000
Member
Ivan Zimine wrote:

> Simon de Vet wrote:
>>
>> I assumed that this would sort both in the order of the y-coordinates.
>> However, when I use these values, my negative values reappear.
>
> 'sort' does not sort input array but returns subscipts for sorting

That's what I thought, and is no doubt what's causing all my problems.

I thought that the way I was handling my arrays would take this into
account. I guess not.

I'll keep trying. I have a hunch that this would be more straightforward if
I were to do it on multiple lines... easier to keep track of what's doing
what.


Simon
Re: Sort and Where [message #20497 is a reply to message #20489] Thu, 29 June 2000 00:00 Go to previous message
Ivan Zimine is currently offline  Ivan Zimine
Messages: 40
Registered: February 1999
Member
Simon de Vet wrote:
>
> I assumed that this would sort both in the order of the y-coordinates.
> However, when I use these values, my negative values reappear.

'sort' does not sort input array but returns subscipts for sorting

IDL> x = [3,1,4,5]
IDL> print, sort(x)
1 0 2 3
; does input array have 0?
IDL> print, x(sort(x))
1 3 4 5

hope this helps
Ivan

--
Ivan Zimine | ivan.zimine@physics.unige.ch
Dpt. of Radiology | (+41 22) 372 70 70
Geneva University Hospitals |
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Sort and Where - SOLVED!
Next Topic: Re: colorbars and contour levels

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

Current Time: Wed Oct 08 18:38:29 PDT 2025

Total time taken to generate the page: 0.00581 seconds