permn
Version 1.0.0 (1,28 KB) von
Kenneth Johnson
Generate permutations of 1:n and permutation parity.
For positive integer n, [p,s] = permn(n) returns all permutations of 1:n as a matrix, size-[factorial(n),n], and also returns the permutation parity s, size-[factorial(n),1]. s(j) is +1 for an even permutation p(j,:), and -1 for an odd permutation.
Zitieren als
Kenneth Johnson (2025). permn (https://www.mathworks.com/matlabcentral/fileexchange/87749-permn), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Erstellt mit
R2020a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS LinuxTags
Quellenangaben
Inspiriert von: permutationparity
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.0.0 |