Random Element

バージョン 1.0.0.0 (1.4 KB) 作成者: Skynet
Returns elements randomly selected from any matrix.
ダウンロード: 2.3K
更新 2005/4/25

ライセンスの表示

RANDELEMENT(ARRAY,N) returns a row of N elements, selected at random (and with replacement) from ARRAY.

[There probably is some toolbox function that does something very similar.]

EXAMPLES:

randelement([0:9],5)
may return [4 8 8 5 2]

randelement({'a' 'b' 'c' 'd' 'e' 'f'},2)
may return {'f' 'd'}

引用

Skynet (2026). Random Element (https://jp.mathworks.com/matlabcentral/fileexchange/6644-random-element), MATLAB Central File Exchange. 取得日: .

MATLAB リリースの互換性
作成: R14SP1
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersCreating and Concatenating Matrices についてさらに検索
バージョン 公開済み リリース ノート
1.0.0.0

Made minor update to description and comments.