ALL PERMUTATIONS OF SEQUENCE

版本 1.0.0.0 (1.3 KB) 作者: Sandeep Solanki
Generates All Permutations of a sequence
237.0 次下载
更新时间 2012/7/18

查看许可证

% Syntax
% "b = allperm(n)" Generates all permutations of Sequence [1:n].
%
% Input :
% n : Greatest Number in Sequence
%
% Output :
% b : output as cell array
%
% Example 1.
% b = allperm(2)
% b =
% {[1 2],[2 1]}
%
% Example 2.
% b = allperm(3)
% b =
% {[1 2 3],[1 3 2],[2 1 3],[2 3 1],[3 1 2],[3 2 1]}
%
% order may be different
%
% Programmed By :
% - Sandeep Solanki
% - rtm_sandeep@rediffmail.com

引用格式

Sandeep Solanki (2024). ALL PERMUTATIONS OF SEQUENCE (https://www.mathworks.com/matlabcentral/fileexchange/37558-all-permutations-of-sequence), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2009b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Data Type Conversion 的更多信息
致谢

启发作品: uniqueperms

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0