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

Home » Public Forums » archive » Re: Matching elements in two arrays of different sizes
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: Matching elements in two arrays of different sizes [message #80653 is a reply to message #80649] Wed, 27 June 2012 09:14 Go to previous messageGo to previous message
lecacheux.alain is currently offline  lecacheux.alain
Messages: 325
Registered: January 2008
Senior Member
On 26 juin, 18:07, pindsy <meredith.p...@gmail.com> wrote:
> Hi everyone,
>
> I am having trouble figuring out how to search through an array of size [1,17824] and match it to the points in another array of size [1,70].
>
> What I am trying to use to match the two arrays are the month, day, year, hour, and minute within each dataset.  I have made two arrays using julday and have been trying to go through each of those arrays to find matches.  However, it only searches up to the 70 first lines of the larger array and dosen't give all the possible matches.
>
> Any ideas on how to fix this would be helpful.
>
> Cheers,
>
> Meredith
>
>

Still use VALUE_LOCATE...
if jd1 and jd2 are the two arrays of julian dates, w will be the
vector of matching indices:
w = where(jd1[Value_Locate(jd1, jd2)] eq jd2, /NULL)

For instance:
IDL> jd1 = julday(indgen(6)*2,1,2012) ;month 1st day, every two
monthes
IDL> jd2 = julday(indgen(12),1,2012) ;1st day of each month
IDL> print, where(jd1[Value_Locate(jd1, jd2)] eq jd2, /NULL)
0 2 4 6 8
10

alain.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: problem in the path
Next Topic: Parallel Processing in IDL

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

Current Time: Wed Oct 08 19:27:23 PDT 2025

Total time taken to generate the page: 0.00260 seconds