How to select specific rows in a table ?
조회 수: 236 (최근 30일)
이전 댓글 표시
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 ?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1031635/image.png)
table = randi(200,200,2) % create a maxtrix 1000x2
index = randsample(1:length(table),20)
result = table(index,:)
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!