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

Home » Public Forums » archive » finding exclusive elements between two not-quite identical 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
Re: finding exclusive elements between two not-quite identical arrays [message #89742 is a reply to message #89740] Wed, 26 November 2014 03:37 Go to previous messageGo to previous message
Heinz Stege is currently offline  Heinz Stege
Messages: 189
Registered: January 2003
Senior Member
Hi Brian,

here is a quick draft:

A = [11, 19, 40]
B = [10, 20, 30, 40]
ii=value_locate(a,b) ; needs a to be sorted
delta=1
jj=where(b-a[ii] gt delta and a[ii+1]-b gt delta,count) ; needs the
; compile option strictarrsubs NOT to be set
if count ge 1 then print,'Part II: ',b[jj]
kk=where(a[0]-b gt delta,count) ; use min(a) if a is not sorted
if count ge 1 then print,'Part I: ',b[kk]

Good luck, Heinz
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: get lat/lon from modis SIN grid
Next Topic: Giving Thanks

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

Current Time: Fri Oct 10 02:18:44 PDT 2025

Total time taken to generate the page: 2.72088 seconds