How to get all possible arrangements for n=10 and more
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi, I wish to get all the possible arrangements for n=10 and more,I used permutation and the output shows me:
>> perms(1:10)
Out of memory. Type HELP MEMORY for your
options.
Error in perms (line 34)
P = V(P);
What can I do except for the permutation in order for me to get all possible arrangements for n=10 and more?Thanks.
0 Commenti
Risposte (1)
Marta Salas
il 18 Giu 2014
http://www.mathworks.com/help/matlab/ref/perms.html [Limitations: perms(v) is practical when length(v) is less than about 10.]
It's quite a big matrix, but it should be able to do the operation if you don't have lots of data already loaded on your workspace.
For n=10 number of permutations is 10! = 3628800 so the size of v is 3628800x10, by default it will do it on double so 0.27Gb. Have you tried to do the operation in uint8?
v = perms(uint8(1:10));
0 Commenti
Vedere anche
Categorie
Scopri di più su Discrete Math in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!