- ## Generate all permutation matrices of size ``integerN``.
- ##
- ## INPUT:
- ##
- ## - ``integerN`` -- The dimension of the resulting matrices.
- ##
- ## OUTPUT:
- ##
- ## - ``PMs`` -- A cell array of permutation matrices.
- ##
+ % Generate all permutation matrices of size ``integerN``.
+ %
+ % INPUT:
+ %
+ % - ``integerN`` -- The dimension of the resulting matrices.
+ %
+ % OUTPUT:
+ %
+ % - ``PMs`` -- A cell array of permutation matrices.
+ %
- ## Generate all permutations of [1,2,...,integerN].
+ % Generate all permutations of [1,2,...,integerN].
permutations = perms([1:integerN]);
for idx = [ 1 : factorial(integerN) ]
sigma = permutations(idx,:);
permutations = perms([1:integerN]);
for idx = [ 1 : factorial(integerN) ]
sigma = permutations(idx,:);