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

Home » Public Forums » archive » Comparing two arrays or different lengths and looking for values within a given range
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
Comparing two arrays or different lengths and looking for values within a given range [message #81004] Mon, 06 August 2012 13:33 Go to next message
HY is currently offline  HY
Messages: 1
Registered: August 2012
Junior Member
Hi all,

I'm new to this group, and Coyote suggested that I direct my inquiry here.

I have two arrays of different lengths, and I need to look for values within a certain range of each other (in this case 400). One array has a number of duplicates while the other does not, which further complicates things, and I've been unable to come up with a solution on my own. Any assistance would be greatly appreciated.

Cheers,
HY
Re: Comparing two arrays or different lengths and looking for values within a given range [message #81097 is a reply to message #81004] Mon, 06 August 2012 19:27 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On 8/6/12 4:33 PM, HY wrote:
> Hi all,
>
> I'm new to this group, and Coyote suggested that I direct my inquiry here.
>
> I have two arrays of different lengths, and I need to look for values within a certain range of each other (in this case 400). One array has a number of duplicates while the other does not, which further complicates things, and I've been unable to come up with a solution on my own. Any assistance would be greatly appreciated.
>
> Cheers,
> HY

I'm not sure I completely understand what you're trying to do. Can you
give an explicit example with the expected behaviour?

-Jeremy.
Re: Comparing two arrays or different lengths and looking for values within a given range [message #81098 is a reply to message #81004] Mon, 06 August 2012 16:42 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Monday, August 6, 2012 4:33:01 PM UTC-4, HY wrote:
> Hi all,
>
>
>
> I'm new to this group, and Coyote suggested that I direct my inquiry here.
>
>
>
> I have two arrays of different lengths, and I need to look for values within a certain range of each other (in this case 400). One array has a number of duplicates while the other does not, which further complicates things, and I've been unable to come up with a solution on my own. Any assistance would be greatly appreciated.

This can be done by simply comparing each element of X with each element of Y. Are you sure that a simple FOR loop won't do?

Craig
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Copying a hash
Next Topic: Most significant digit and formatting floating point output

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

Current Time: Wed Oct 08 15:14:50 PDT 2025

Total time taken to generate the page: 0.00613 seconds