How to select specific rows in a table ?
299 views (last 30 days)
Show older comments
Dear All,
I have a table with 200 rows and 2 columns.
Now, I want to select 40 rows with step of 5. row 1 , 5 ,10, 15 ... 200. I try ramsample but it is randoms.
Could any one help me ?
table = randi(200,200,2) % create a maxtrix 1000x2
index = randsample(1:length(table),20)
result = table(index,:)
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Logical 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!