How to filter data that detects peaks or irregularities?
Mostra commenti meno recenti

I am trying to build a code that detects these peaks. This graph represents the change in position in time. What I am doing is read the distance timestep by timestep.
I compare the new distance minus the old distance, if this values difference is higher than 5 meters I assume theres a peak. The problem is that each dataset have undefined number of peaks and undefined number of green datasets to save.
How can I solve this?
Risposte (1)
Star Strider
il 18 Gen 2020
0 voti
Several functions already exist to do that, among which are findpeaks, islocalmax, ischange, and others.
7 Commenti
Mariana
il 18 Gen 2020
Star Strider
il 18 Gen 2020
The findpeaks function detects all peaks within each data set, although if you set restrictive criteria for them with the name-value pair arguments, it may miss some that do not meet those criteria.
It may also not detect ‘peaks’ at each end because they do not meet its definition of ‘peaks’. It will detect those as well if you append very small numbers at each end of the vector (such as -realmin).
Mariana
il 18 Gen 2020
Star Strider
il 18 Gen 2020
Yes. It is part of the Signal Processing Toolbox.
The other functions are part of MATLAB itself, and were introduced in R2017b.
Mariana
il 18 Gen 2020
Star Strider
il 18 Gen 2020
Do you have R2017b or later?
Note: No data to analyse.
Image Analyst
il 18 Gen 2020
Mariana, make it easy for people to help you, not hard. Attach your data in a .mat file with the paper clip icon after you read this link.
Categorie
Scopri di più su Descriptive Statistics in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!