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

Home » Public Forums » archive » Re: Coincident values of string and numbers in 2 arrays..
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Coincident values of string and numbers in 2 arrays.. [message #51869] Thu, 14 December 2006 13:34
greg michael is currently offline  greg michael
Messages: 163
Registered: January 2006
Senior Member
Violeta wrote:
> Hello all:
> Maybe you can help me with this:
> I have 2 files, with columns for station id and depth. The first one
> has 2 columns like this
> 'IS02-34' 1
> 'IS02-34' 2
> IS02-34' 3
> 'IS02-35' 1
> 'IS02-35' 2
> 'IS02-35' 3
> 'IS02-37' 0
> 'IS02-37' 1
> 'IS02-37' 2
>
> And the second one has similar structure:
> 'IS02-35' 1
> 'IS02-35' 2
> 'IS02-35' 3
> 'IS02-37' 1
> 'IS02-37' 2
> 'IS02-37' 3
> 'IS02-39' 0
> 'IS02-39' 1
> 'IS02-39' 2
>
> Basically I want to find the lines on each file that both string
> (station id) and depth=1 are coincdent, and extract them.
> In this example, lines 4,8 from the first file, coincide with lines 1,4
> from the second.
> Any idea about how could I do this for 2 large files? I tried using
> 'where' but it doesn't like it....
> Thanks

Sounds like a set intersection you need...

http://www.dfanning.com/tips/set_operations.html

regards,
greg
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Coincident values of string and numbers in 2 arrays..
Next Topic: Re: Can IDL create a plain text file?

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

Current Time: Wed Oct 08 19:31:58 PDT 2025

Total time taken to generate the page: 0.00367 seconds