Enumerate outcomes of Sampling without order, but with replacement

Draw k times from {1,2,..,n}, but return each drawn element -- which unique combinations are there?
ダウンロード: 208
更新 2012/2/29

ライセンスの表示

Given a set
S = {1,2,...,n},
nreplace(n,k) returns a matrix, each row of which represents a possible outcome of selecting k elements from S, while one element can be selected multiple times. See e.g. the Example at the bottom of http://en.wikibooks.org/wiki/Probability/Combinatorics#Partitions.
The implementation is recursive, using a nested function, so it will only run on Matlab Version 7 and upwards.

引用

Jonathan Epperl (2024). Enumerate outcomes of Sampling without order, but with replacement (https://www.mathworks.com/matlabcentral/fileexchange/35378-enumerate-outcomes-of-sampling-without-order-but-with-replacement), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2010b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0