Find minimum or maximum value - two conditions
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi there,
I have a problem where I am trying to find the index of minimum or maximum values based on two conditions. I have separated my data into 10 second blocks, with 1 data point per second. The two conditions are as follows:
1) the next minimum value must not be within 5 seconds of the previous minimum value
2) the next minimum value must be within the 10 second block following the previous minimum value's 10 second block.
Presently, I can ensure the next indexed minimum value meets one condition or the other, but I cannot ensure that it meets both.
Any ideas would be much appreciated!
Luke
댓글 수: 3
답변 (1개)
Steven Lord
2023년 5월 9일
I think the islocalmin and islocalmax functions will be of use to you. See the MinSeparation name-value argument.
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!