Alphabetical random permutation
Mostrar comentarios más antiguos
Hii...
in MATLAB, how to perform permutation and random permutation for alphabet?
ex: I want to do random permutation for [A B C], and the result should be [A B C], [A C B], [B A C],....,etc. If my question is not clear please inform me, because I just start learning MATLAB.
Thank you Muammar
Respuesta aceptada
Más respuestas (1)
Sean de Wolski
el 7 de Dic. de 2011
So:
alphabet = 'A':'Z';
alphabet = alphabet(randperm(numel(alphabet)))
Categorías
Más información sobre Random Number Generation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!