フィルターのクリア

Is it possible to obtain a random sample of values from a matrix without the randsample tool?

1 回表示 (過去 30 日間)
Is it possible to obtain a random sample of values from a matrix without the randsample tool?

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2012 年 11 月 24 日
編集済み: Azzi Abdelmalek 2012 年 11 月 24 日
A=magic(6);
out=A(randi(numel(A),1))
if you want 3 values for example
out=A(randi(numel(A),3,1))

その他の回答 (0 件)

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by