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

Home » Public Forums » archive » The intersection of 2 arrays
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
The intersection of 2 arrays [message #8357] Mon, 03 March 1997 00:00 Go to previous message
Phil Williams is currently offline  Phil Williams
Messages: 78
Registered: April 1996
Member
I know that I can find the union of two arrays by doing something like

temp = [array1, array2]
union = temp(uniq(temp, sort(temp)))

But how would I go about finding the intersection of the two arrays?
i.e. Is there a nice vector way of doing it rather than brute force?
(aka: Which IDL function did I miss this time?)

Thanks in advance,
Phil
--
/*********************************************************** ********/
Phil Williams, Ph.D.
Research Instructor
Children's Hospital Medical Center "One man gathers what
Imaging Research Center another man spills..."
3333 Burnet Ave. -The Grateful Dead
Cincinnati, OH 45229
email: williams@irc.chmcc.org
URL: http://scuttle.chmcc.org/~williams/
/*********************************************************** ********/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: undefining variables
Next Topic: size of usersym symbols

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

Current Time: Fri Oct 10 15:57:35 PDT 2025

Total time taken to generate the page: 0.40237 seconds