Determining the distance between the peaks

2 ビュー (過去 30 日間)
Lev Mihailov
Lev Mihailov 2019 年 7 月 9 日
回答済み: Roy Kadesh 2019 年 7 月 9 日
Hello! I have a matrix, where for each column I have to determine the length of the peak. The problem is that the matrix is ​​large and you need to start with a specific row in this column. Help me the best way to do this.Peak = + 10 or -10 from the previous value
for Vatl(i)+en>en;
% en is how much to add to each value
% Vatl is the value to start counting
MaxPeak1=VatlPoint(Vatl(i)-en:Vatl(i));
MaxPeak2=VatlPoint(Vatl(i):end);
[pks1,locs1] = findpeaks(MaxPeak1,-10:10,'MinPeakDistance');
[pks2,locs2] = findpeaks(MaxPeak2,-10:10,'MinPeakDistance');
end
Why is this option not working

回答 (1 件)

Roy Kadesh
Roy Kadesh 2019 年 7 月 9 日
In the documentation you can find the correct syntax. You need to provide the Name argument first and then the Value argument:
[pks1,locs1] = findpeaks(MaxPeak1,'MinPeakDistance',10);
Note that the 10 here is in units of samples.

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by