我有一个信号,如下图所示:
我想计算信号内发生的4个高峰。有没有可以检测我信号的算法?
答案 0 :(得分:1)
这样的事情怎么样?
[localmax,maxind] = findpeaks(x);
inversex = 1.01*max(x) - x;
[localmin,minind] = findpeaks(inversex);
%//this gives all maxima and minima, now you can compute the width.
%//as for the top 4 peaks, surely you just sort and index 1:4 upon the result or in the beginning.