Select data above a specific threshold & minimum length
9 ビュー (過去 30 日間)
古いコメントを表示
Hi,
You could find attached a signal which represents ground reaction force during running.
My aim is to cut each subsamples (each "big wave") above 50 Newtons.
However, you could see that there are some "little wave" near 70-100 Newtons. Thus, some steps are not right...
How could I cut properly these subsamples ?
I've already write this :
DataON =GRF > 50
DataONOFF=diff(DataON)
[pks2,locs2] = findpeaks(DataONOFF)); %Heel strike +1 si Heel Strike
T_HS=locs2+1;
[pks3,locs3] = findpeaks(DataONOFF*(-1)); %Toe Off -1 si Toe Off
T_TO=locs3+1;
but I guess that I need to precise "a minimum width" ?
Thanks in advance for your help !
Louise
0 件のコメント
回答 (1 件)
Aghamarsh Varanasi
2021 年 4 月 19 日
編集済み: Aghamarsh Varanasi
2021 年 4 月 19 日
Hi,
You can use the 'MinPeakHeight' and 'MinPeakWidth' Name-Value pairs in the findpeaks function to set the minimum peak height and minimum peak width. You can try to visualize the results from the findpeaks function as shown below.
load GRF.mat
% suppose the minimum peak height is 50 and minimum peak width is 20
[peakValues, peakValueLocation, widthofPeak] = findpeaks(GRF, 'MinPeakHeight' , 50, 'MinPeakWidth', 20);
% you can visualize the peaks by plotting them as follows
plot(GRF)
hold on
plot(peakValueLocation, peakValues,'o')
Hope this helps
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!