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

Home » Public Forums » archive » Re: Strange return from where function
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: Strange return from where function [message #67976 is a reply to message #67973] Tue, 15 September 2009 22:19 Go to previous message
byrne.david is currently offline  byrne.david
Messages: 3
Registered: November 2007
Junior Member
On Sep 16, 3:14 pm, David <byrne.da...@gmail.com> wrote:
> 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

Actually i found the problem. It was that index was Float = array[1] I
had to use wh_track_full=where(tracks[0,*] eq index[0]) for it to
work.

-David
[Message index]
 
Read Message
Read Message
Previous Topic: Re: issues with scrollwindow
Next Topic: Re: Mapping the US with values for each state

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

Current Time: Sun Oct 12 06:27:55 PDT 2025

Total time taken to generate the page: 1.12122 seconds