Strange return from where function [message #67977] |
Tue, 15 September 2009 22:14 |
byrne.david
Messages: 3 Registered: November 2007
|
Junior Member |
|
|
Hey guys not sure what is going on here.
I have an array with particle IDs to track particles. I want to search
for the particles in the array by thier particle ID.
Simple where call but its being strange. This is what i get
IDL> print,index
1.00000
IDL> wh_track_full=where(tracks[0,*] eq index)
IDL> print, wh_track_full
0
IDL> wh_track_full=where(tracks[0,*] eq 1.0000)
IDL> print, wh_track_full
0 1
So you see it finds all the elements with an ID of 1.000 if i type in
the actual value. But when i assign it to a variable I just pick up
the first element and not the second.
I've never come across this before,
any ideas?
Regards
David
|
|
|