help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie - Common value patterns in many vectors


From: Jordi Gutiérrez Hermoso
Subject: Re: Newbie - Common value patterns in many vectors
Date: Wed, 5 Oct 2011 13:03:49 -0500

On 5 October 2011 06:15, thombark <address@hidden> wrote:
> I have a large number of vectors. Each contains from 1 to 100 numbers, and
> each number is within the range 1-60. I need to find the vectors containing
> N  common numbers. For example, here are 6 vectors:-
>
> 1  12  28  46
> 12  16  46  49  52  58
> 8  12  24  28 33  45  46  47  53  57
> 9
> 12  16  24  28  46  52
> 18  33  45
>
> If N is 3, then I am looking for any vectors containing at least 3 common
> values.
>
> In this case, vectors 1,3,5 have "12  28  46" in common and vectors 2,5 have
> "12  16  46  52" in common.
>
> The final result would be 2 vectors - (1,3,5) and (2,5).

This sounds a little like an XY problem:

    http://www.perlmonks.org/index.pl?node_id=542341

It also sounds awkward to do in Octave. Is another language an option?

- Jordi G. H.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]