nextperm

版本 1.1.0.0 (1.3 KB) 作者: Steven Gregory
Outputs the next permutation of the ordered tuple x.
968.0 次下载
更新时间 2010/8/12

查看许可证

Using lexical order on the set {1, 2, ..., N}, outputs the next permutation of the ordered tuple x. You have exhausted the list when All(nextperm(x,N) == x) is TRUE.

For example
nextperm([1 5 4], 5) returns [2 1 3]
nextperm([2 1 3], 5) returns [2 1 4]
nextperm([5 4 3], 5) returns [5 4 3]

引用格式

Steven Gregory (2024). nextperm (https://www.mathworks.com/matlabcentral/fileexchange/22692-nextperm), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2006a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Linear Algebra 的更多信息

Community Treasure Hunt

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

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

Made a small change in the description of the function.

1.0.0.0