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

Home » Public Forums » archive » Sort and Where
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Sort and Where [message #20498] Thu, 29 June 2000 00:00
Simon de Vet is currently offline  Simon de Vet
Messages: 36
Registered: May 2000
Member
I have a big array of data, and wish to plot one part of it against
another.

On the x-axis I want :
pem1(flight, where(pem1(4,*,6) gt 0.0 and pem1(4,*,9) gt 0.0),
9)
And on the y-axis I want:
pem1(flight, where(pem1(4,*,6) gt 0.0 and pem1(4,*,9) gt 0.0),
6)

I have used negative numbers to indicate missing data, so these are just
all the values where both an x and a y coordinate exist.

If I plot one vs the other, it works perfectly. However, I would like to
connect the points together, so the y-coordinates (in my case) must be
in ascending order. I try to use sort.

New x-axis:
pem1(flight, sort(pem1(flight, where(pem1(4,*,6) gt 0.0 and
pem1(4,*,9) gt 0.0), 6)), 9)
New y-axis:
pem1(flight, sort(pem1(flight, where(pem1(4,*,6) gt 0.0 and
pem1(4,*,9) gt 0.0), 6)), 6)

I assumed that this would sort both in the order of the y-coordinates.
However, when I use these values, my negative values reappear.

I think that this may have something to do with the Where statement.
Originally, I only culled the negative y-coordinates, and then it sorted
fine. The problems started when I started eliminating values with a
negative x or y coordinate.

I should probably mention that after staring at these 2 lines for 45
minutes my brane is turning to mush.

Anyone know what's going on? Anyone have a simple solution?


Simon
[Message index]
 
Read Message
Previous Topic: Creating a GIF file from a graphics window in IDL
Next Topic: Re: HOW CAN I CALL AN EXTERNAL C ROUTINE FROM IDL ???

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

Current Time: Thu Oct 09 07:55:01 PDT 2025

Total time taken to generate the page: 0.64109 seconds