creating sequences of unique integers drawn from an interval, which overlap with other sequences to a ceratin degree
Afficher commentaires plus anciens
Hello Gurus
Need your help with creating a list of integer sequences that are unique within the sequence but have certain number of common integers with other sequenes in the list.
Now we can create a list of sequences by using the combnk function in matalab which gives all the combinations of integers in a particular interval, So combnk(1:6,4) gives
3 4 5 6
2 4 5 6
2 3 5 6
2 3 4 6
2 3 4 5
1 4 5 6
1 3 5 6
1 3 4 6
1 3 4 5
1 2 5 6
1 2 4 6
1 2 4 5
1 2 3 6
1 2 3 5
1 2 3 4
but I want only those sequences that differ from all other sequnces by a max of two integers for example so I want only
3 4 5 6
1 2 5 6
1 2 3 4
all other sequnces are ignored.Can you pls give me formula to calculate the number of such sequnces in a list, and also if there is a function that does this Thanks in Advance
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Descriptive Statistics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!