필터 지우기
필터 지우기

Index cell where number jumps

조회 수: 9 (최근 30일)
Brent
Brent 2011년 11월 21일
I'm trying to identify the cell where the numbers jumps drastically...
example:
[1 2 3 4 5 6 20 21 22 23 24 25 60 61 62 63 64 65]
How do I indentify the index where 6 and 25 stop in the section of increasing numbers and the new section of increasing numbers continues.
Thanks for your help!

채택된 답변

Fangjun Jiang
Fangjun Jiang 2011년 11월 21일
A=[1 2 3 4 5 6 20 21 22 23 24 25 60 61 62 63 64 65]
B=diff(A)
find(B>1)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by