ALL PERMUTATIONS OF SEQUENCE

Generates All Permutations of a sequence
ダウンロード: 237
更新 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 Center および MATLAB AnswersData 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