# How do I determine which row my value change significantly

조회 수: 1 (최근 30일)
new2matlab 2019년 11월 26일
댓글: new2matlab 2019년 11월 26일
I'm looking to automate the process of finding where my column data changes from 375 (about the first 7 rows right now), as it starts decreasing constantly after that. Depending on the data loaded in, the change from a constant 375 can start anywhere from row 3 to row 8, so I'd like to detect where it begins. Thanks!

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

### 채택된 답변

Turlough Hughes 2019년 11월 26일
편집: Turlough Hughes 2019년 11월 26일
You could find where data is not equal to 375 and then take the first index where this condition is true:
rowstart=min(find(data~=375))
Then your new data would be:
data2=data(rowstart:end);
##### 댓글 수: 1이전 댓글 -1개 표시이전 댓글 -1개 숨기기
new2matlab 2019년 11월 26일
This is exactly what I needed. Thank you!

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

### 추가 답변 (1개)

Im assuming its roughly 375 and not exactly that value, otherwise go with Turlough Hughes' solution which is simpler.
The easiest method is to compare the values with tolerance to changes. You can define a threshold value that you would concider as significant reduction
% for the sake of this example I'm using 5% of the initial value (should be ~5% of 375)
threshold = 0.05*data(1);
sigDecMask = data < (data(1) - threshold);

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

### 카테고리

Help CenterFile Exchange에서 Graphics Object Programming에 대해 자세히 알아보기

### Community Treasure Hunt

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

Start Hunting!

Translated by