Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Idl - where function help

  1. Jul 12, 2007 #1
    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 :-(
  2. jcsd
  3. Jul 14, 2007 #2
    Can you mention which language you are using?

    Mr V
  4. Jul 15, 2007 #3


    User Avatar
    Homework Helper

    I think he's using IDL, based on the thread title.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook