Info

この質問は閉じられています。 編集または回答するには再度開いてください。

I'm given a data set of over 7500 points (generated by an ECG) and I need to find all of the relative max and mins.

1 ビュー (過去 30 日間)
Ryan Cabitac
Ryan Cabitac 2018 年 8 月 30 日
終了済み: MATLAB Answer Bot 2021 年 8 月 20 日
The data points are so close together that it increases and decreases with every data point and creates thousands of negligible changes. I need to single out the big changes. I am trying to use a method that will detect if a value at 'n' is greater than the previous 50 values and next 50 values. I do not want to write it out fully. i.e
if data(n) > data(n+1) && data(n+2) && ... && data(n+50)
fprintf('true')
end
I would like to consolidate that into a more efficient line of code.

回答 (1 件)

Greg
Greg 2018 年 8 月 30 日
Have you tried the islocalmin and islocalmax functions (introduced in R2017b)? Specifically, check out the option for 'MinSeparation' to limit how closely local extrema may be detected to each other.
  1 件のコメント
Ryan Cabitac
Ryan Cabitac 2018 年 8 月 30 日
Unfortunately I have R2017a. It doesn't have that function.

タグ

製品


リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by