Comparing two arrays or different lengths and looking for values within a given range [message #81004] |
Mon, 06 August 2012 13:33  |
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  |
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  |
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
|
|
|