Sort and Where [message #20498] |
Thu, 29 June 2000 00:00 |
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
|
|
|