View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
permnsub(V,N, IX)

5.0 | 1 rating Rate this file 6 Downloads (last 30 days) File Size: 2.99 KB File ID: #41206 Version: 9.9

permnsub(V,N, IX)


Jos (10584) (view profile)


09 Apr 2013 (Updated )

Subset of all permutations with repetition

| Watch this File

File Information

Its functionality is now implemented in my function PERMN, available on the File Exchange
permnsub - subset of all permutations with repetition
    M = permnsub(V,N,IX) returns a subset of all permutations, with
    repetition, of N elements, taken from the elements in vector V. M has
    the size numel(IX)-by-N. V can be an array of numbers, cells or strings,
    and M will be of the same type as V.
   Use PERMN instead


Permn(V, N, K) inspired this file.

MATLAB release MATLAB 7.14 (R2012a)
MATLAB Search Path
Other requirements Should work in most ML releases
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
22 Jun 2013 Jan Simon

Jan Simon (view profile)

This is an excellent implementation of a very efficient method. Together with the exhaustive documentation this submission is useful, usable and valuable for the productive work and education. Thanks, Jos!

A tiny simplification: You do not need B(:)', because B is a row vector already.

24 Jun 2013 1.1

1.1 - implemented suggestion of Jan; output is now always a row vector

19 May 2015 2.0

renamed submission, extended help section

19 May 2015 2.0.1

included correct file

20 May 2015 9.9

obsolete. Use PERMN

Contact us