フィルターのクリア

Selecting random number from martrix

1 回表示 (過去 30 日間)
Pat
Pat 2011 年 11 月 9 日
I have a matrix of 10rows and 10 columns,i want to select 5 rows randomly ,please help

採用された回答

signal
signal 2011 年 11 月 9 日
one way to do it is
row = randperm(10);
row = row(1:5);
result = your_matrix(row,:);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRandom Number Generation についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by