Plot the result of findpeaks.
Show older comments
Dear all,
I captured human motion data of side-by-side walking in numerous data sets. The filtered data looks like that:

Now, I used the function findpeaks to find peaks and location of the filtered data and stored it in a struct.
for i = 1:numel (data)
[pks_1,locs_1] = findpeaks (data(i).filt_first_last_transposed (1,:)); % find peak and location
data(i).peaks_1 = pks_1; % store it into the struct 'data' with the field name peaks_1
data(i).locs_1 = locs_1; % see above
[pks_2,locs_2] = findpeaks (data(1).filt_first_last_transposed (2,:));
data(i).peaks_2 = pks_2;
data(i).locs_2 = locs_2;
end
I am struggling how to plot the filtered data including the identified pks. In doing so, I can inspect, if identified peaks are correct.
Any suggestions or an easier way to get results?
Regards, Jonas
1 Comment
Image Analyst
on 28 Dec 2021
Edited: Image Analyst
on 28 Dec 2021
You forgot to attach your data. Make it easy for us to help you, not hard.
Is your second curve supposed to be data(1) and not data(i)?
Accepted Answer
More Answers (0)
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!