NMULTICHOOSEK

Fast unordered samples with or without repetition.
1,9K download
Aggiornato 17 nov 2005

Visualizza la licenza

NMULTICHOOSEK(N,K) finds the number of multisets of length k on n symbols. NMULTICHOOSEK can take vector or scalar input.

NMULTICHOOSEK(N,K,'single') is the same as NCHOOSEK (unordered samples WITHOUT repetition), except that it accepts vector inputs for both n and k.

NMULTICHOOSEK(N,K,'multi') is the same as NMULTICHOOSEK(N,K).

Examples:
N = nmultichoosek(5,1:5)

finds the number of multisets of
length 1 to 5 from a 5 symbol set

N = nmultichoosek(5,1:5,'single')

is the same as:

for k=1:5
N(k) = nchoosek(5,k);
end

Cita come

Peter (PB) Bodin (2024). NMULTICHOOSEK (https://www.mathworks.com/matlabcentral/fileexchange/9029-nmultichoosek), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R14SP3
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
Versione Pubblicato Note della release
1.0.0.0

changed category.