create a matrix that keeps only the sequential numbers
이전 댓글 표시
Hi! I need to create a matrix that keeps only the sequential numbers in the first column (and keep the corresponding number in the second column) and delete everything else. Here is an example:

댓글 수: 3
Akira Agata
2023년 8월 3일
What happens if the 1st column consists of two sequential numbers, like: [1 2 3 4 7 8 9 10]' ?
Alberto Acri
2023년 8월 3일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!