Selecting random number from martrix

4 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Random Number Generation 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by