Using the Where Function in IDL to Search for a Specific Date in an Array

  • Thread starter Thread starter conquertheworld5
  • Start date Start date
  • Tags Tags
    Function
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 23K views
conquertheworld5
Messages
22
Reaction score
0
Hey,beginner programmer with a simple question...
is there any way I can use the where function to search for a string in elements of an array?
I have a structure with two arrays, the first for the date (a string in the form of dd-mm-yyyy i.e. 11-07-2007) and the second has data. I want all the elements that correspond to a certain day.
what I tried to do:

a=where(b.a eq "11-07-2007")
then I expected to get all the spots in the array that had that date... all i got was -1 :-(
 
Physics news on Phys.org
Can you mention which language you are using?

Mr V