permn

Generate permutations of 1:n and permutation parity.

Vous suivez désormais cette soumission

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.

Citation pour cette source

Kenneth Johnson (2026). permn (https://fr.mathworks.com/matlabcentral/fileexchange/87749-permn), MATLAB Central File Exchange. Extrait(e) le .

Remerciements

Inspiré par : permutationparity

Add the first tag.

Informations générales

Compatibilité avec les versions de MATLAB

  • Compatible avec toutes les versions

Plateformes compatibles

  • Windows
  • macOS
  • Linux
Version Publié le Notes de version Action
1.0.0