Selecting random number from martrix
4 views (last 30 days)
Show older comments
I have a matrix of 10rows and 10 columns,i want to select 5 rows randomly ,please help
0 Comments
Accepted Answer
signal
on 9 Nov 2011
one way to do it is
row = randperm(10);
row = row(1:5);
result = your_matrix(row,:);
0 Comments
More Answers (0)
See Also
Categories
Find more on Random Number Generation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!