findchangepts does not dectect some changes

1k views Asked by At

I am writing code that takes a signal from an accelerometer and I use the TVD algorithm in order to denoise the signal. As we can see in the following graph I managed to do that:

Denoising

But I want to detect the peaks, and I think that I could use the findchangepts function in MATLAB, but when I run it I have the following:

findchangepts function run

As we can see it not detects the peaks. Does anyone know any setting in the function, or a way to denoise inside the peak?

1

There are 1 answers

1
Miguel Sanz Narrillos On

I manage to do that with the findpeaks function as follows:

[pks, locs] = findpeaks(x,'MinPeakProminence',0.25*max(x),'MinPeakDistance',50);

and having x passing throght a series of envelope filters and low pass filters as:

[yupper,ylower] = envelope(x)

Hope it will be usseful for someone