필터 지우기
필터 지우기

Find next 1 row after row x

조회 수: 3 (최근 30일)
chels19
chels19 2016년 7월 5일
댓글: José-Luis 2016년 7월 5일
Hi all, I've got a matrix of data and need to start at a specific row within the dataset and, based on a condition, select the next 1 row. For example taking this test data:
I need to:
a = iterate through the dataset and get the value of column 4 that corresponds to column 7 == 0 (i.e. 100)
starting at position a (100), get the next 1 row of data from column 4 where column 7 == 1 (i.e. 343) and iterate through the data
In this case I would expect 343 to be returned (green).
I hope I've explained it well and any help would be greatly appreciated.
  댓글 수: 1
José-Luis
José-Luis 2016년 7월 5일
This looks like homework. I would start reading up on indexing, particularly logical indexing. Please feel free to ask question here if you get stuck.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by