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

Home » Public Forums » archive » Re: Logic problem
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: Logic problem [message #58201 is a reply to message #58200] Thu, 17 January 2008 09:46 Go to previous messageGo to previous message
Ryan. is currently offline  Ryan.
Messages: 77
Registered: March 2006
Member
Craig Markwardt wrote:
> For example,
> ;; A list of days from start to finish
> RANGE = DATE + DINDGEN(ENDDATE-DATE+1)
> ;; Which files match the file start date?
> ;; (NOTE: assumes DIRDATES is ascending order)
> II = VALUE_LOCATE(DIRDATES(0,*), RANGE)
> ;; Keep only those that agree with the file end date.
> WH = WHERE(RANGE LT DIRDATES(1,II), CT)
> IF CT EQ 0 THEN MESSAGE, 'No match!!!!'
> II = II(WH)
>
> ;; These are the acceptable directories
> II = II(UNIQ(II,SORT(II))) ;; remove duplicates
> FOUND_DIRS = DIRS(II)

Thanks Ben and Craig for your help. I wasn't aware of the VALUE_LOCATE
function in IDL. I've tried these lines to get the results I want but I
get "No Match" for every date I enter. I've traced it back to the "II"
variable being an array of ones, all the time. Is this signaling that
my DIRDATES array is not in ascending order? I currently haven't made
any attempts to make it that way.

Ryan.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Format of contour labels?
Next Topic: bizzare idlwave abbrev behavior

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

Current Time: Fri Oct 10 14:52:14 PDT 2025

Total time taken to generate the page: 1.51608 seconds