Find a position of last changing value in array
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello,
i'm looking for function that detect a position of detection of last changing value (value stay constant or have just little changes).
In this case tube_dimension = 37;
I'm realize this in for-loop, but maybe thereare better way?
Sensivity_old = Sensivity;
TP ...
FN ....
Sensivity = (TP ./ (TP + FN));
if (Sensivity > Sensivity_old + 1.0e-03)
Sencivity_end = tube_cnt;
else
end
disp(Sencivity_end)
Thank you!
댓글 수: 0
채택된 답변
Umair Hassan
2020년 6월 7일
편집: Umair Hassan
2020년 6월 7일
Hi Nikita,
You can use MATLAB's built in function differentrial (diff) to find out the minimum variability points of your data. The first index of the those points would be where your data would have the plateau. If you can attach some data, I would give you a code as well, otherwise psuedo code is:
plateau_points=diff(sensitivity);
plateau_points=find(plateau_points ==0) % finding where the points have 0 change
plateau_tube_dimension=tube_dimension(plateau_points(1));
Hope this helps,
Thanks!
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Distribution Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!