Effacer les filtres
Effacer les filtres

Sequential or selective access to N Permute K

2 vues (au cours des 30 derniers jours)
Ulrik William Nash
Ulrik William Nash le 17 Juil 2017
Modifié(e) : Stephen23 le 17 Juil 2017
I found the function below on File Exchange developed by Loginatorist, which creates a matrix of permutations of elements with replacement. The problem with this function and similar official MATLAB functions that generate a matrix of all possible combinations (such as combnk) is that the output matrix quickly breaches the memory limits.
I would be interested in learning if anyone has developed code that can achieve the same effect, but without actually generating the large matrix. Instead, each row of such a final matrix should be computable simply by specifying the row number. Then, if one wanted all entries, one could simply look through each row.
Perhaps someone has a good idea about how to achieve this in the setting of the function below:
EDIT by Stephen Cobeldick: the function is copyright by Matt Fig, but is available here:

Réponse acceptée

Stephen23
Stephen23 le 17 Juil 2017
Modifié(e) : Stephen23 le 17 Juil 2017

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by