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

Home » Public Forums » archive » greater than X and less than Y
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
greater than X and less than Y [message #36223] Thu, 28 August 2003 10:34 Go to previous message
bradbury is currently offline  bradbury
Messages: 3
Registered: August 2003
Junior Member
Here is an easy one:

I can find the location of data in my array at the top and at the
bottom of it's range. But how do I find the location of the
data in the middle of this range.

example:

data=[10,35,11,5,17,5,24,13,22,30,8,20,1,16,19,31,29,3,23,33 ,37]

N=size(data,/N_elements)

; returns a vector of subscripts that allows access
; to the elements of "data" in ascending order
sort_data=sort(data)

; returns "data" values in ascending order
new_data=data[sort_data]

; calculates "data's" 66th percentile
top66=new_data(0.66*N)

; returns vector with ones in place of values in
; top 66 percentile of "data"
high66=data gt top66

; calculates "data's" 33rd percentile
bot33=new_data(0.33*N)

; returns vector with ones in place of values in
; bottom 33 percentile of "data"
low33=data lt bot33

Using a similar method (or not) how would I create
a "mid33," and thus gain access to the data in the range
between the bottom 33rd and the upper 66th percentiles.

SO, I guess my problem is with using the operators "gt" and "lt."

Thanks very much, in advance...
[Message index]
 
Read Message
Read Message
Previous Topic: working with IDLtoAVI.dlm
Next Topic: map_patch and triangulating satellite images

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

Current Time: Fri Oct 10 13:25:43 PDT 2025

Total time taken to generate the page: 1.58854 seconds