Find Maxima and Minima in noisy data

4 views (last 30 days)
Alexa Keeling
Alexa Keeling on 23 Apr 2019
I'm trying to find locations of local maxima and minima from a raw data set of velocities that is quite noisy. Using [pks,locs] = findpeaks(data) returns a few hundred values when there should be only about a handful. I tried using smooth to fix the problem and that knocked down a few hundred maxima but that is still far too many. I've plotted the data so I can get a sense of where these maxima should occur:
Peaks.png
This is the code leading up to my dilemma that just combines the X and Y velocities:
XVel = new_data.c3d(trial).Right_HandXVel;
YVel = new_data.c3d(trial).Right_HandYVel;
trial_velocities = sqrt(XVel.^2 + YVel.^2);
Does anyone have any suggestions on how I can either smooth out the data enough or a way to code only finding major peaks?
Thanks

Answers (0)

Community Treasure Hunt

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

Start Hunting!