Alphabetical random permutation
显示 更早的评论
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
采纳的回答
更多回答(1 个)
Sean de Wolski
2011-12-7
So:
alphabet = 'A':'Z';
alphabet = alphabet(randperm(numel(alphabet)))
类别
在 帮助中心 和 File Exchange 中查找有关 Random Number Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!