フィルターのクリア

How to make 'MinPeakDistance' consider first point close to last point in findpeaks ?

2 ビュー (過去 30 日間)
Quentin CLÉMENT
Quentin CLÉMENT 2016 年 6 月 6 日
回答済み: Peter Cook 2016 年 6 月 15 日
Hi,
I am having trouble with findpeaks. I want to find the two highest peaks in a set of data, which are not too close from one another. I use the following function :
findpeaks(data,'SortStr','descend','NPeaks',2,'MinPeakDistance',min_distance);
The problem is that I want it to consider the first points and the last ones as close to one another, like periodic boundary condition. Indeed, here it may return two peaks that are at the beginning and at the end of the data whereas their distance is smaller than min_distance considering periodic boundary condition.
How can I deal with this ?

回答 (1 件)

Peter Cook
Peter Cook 2016 年 6 月 15 日
If your signal is periodic, you could try to circshift() the signal a couple times (by say, length(signal)/4 or length(signal)/3) and see if you get the same result.

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by