Algorithm that recognizes decays

1 vue (au cours des 30 derniers jours)
Imane Ihaddouchen
Imane Ihaddouchen le 8 Oct 2020

Réponses (1)

Shashank Gupta
Shashank Gupta le 14 Oct 2020
Hi,
You can tackle this problem by using first order derivative of the data. First find the difference array, you can refer to diff function and create a difference array, you can use this array to find peaks and dips in the data. those peaks and dips are the point which you intent to find, try looking at findpeaks function, it will help you find those points. I am attaching a small placeholder code for you to refer.
% find difference array.
diffArr = diff(z_3);
% Find peaks.
[peakValues,peakIdx] = findpeaks(diffArr);
% Find dips.
% just invert the data and use the same function.
invertedY = max(diffArr) - diffArr;
[dipValues, dipIdx] = findpeaks(invertedY);
I hope this helps you to atleast get some headstart.
Cheers

Community Treasure Hunt

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

Start Hunting!

Translated by