Separating left and right leg data given ground reaction force gait data?

30 views (last 30 days)
Hi,
I have an Excel file with several columns of ground reaction force data where each column is a different test subject. My question is, how can I separate each column into left leg data and right leg data. Where stride 1 is assumed to be the right leg, therefore all odd numbered strides are right leg strides and all even numbered strides are left leg strides. I have attached the first column of my data to give you an idea of what I am looking at. Any guidance would be great. Thank you so much!
  4 Comments
jennifer aniston
jennifer aniston on 1 Oct 2016
Thanks Star Strider,
I am new on this group so finding my way around. If you find the time please take a look at my question. Link: https://in.mathworks.com/matlabcentral/answers/305313-advice-on-processing-raw-gait-data
Thanks!

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 30 Sep 2016
You need to use the Signal Processing Toolbox findpeaks function. It retuens the values of the peaks and their locations. I only had the indices to work with, but you can easily use the indices to convert to time if you need to.
The code:
[d,s,r] = xlsread('Anthony 1 Column Gait Data.xlsx');
[pks,locs] = findpeaks(d, 'MinPeakDistance',500, 'MinPeakHeight',1000);
figure(1)
plot(d)
hold on
plot(locs(1:2:end), pks(1:2:end), '^r', 'MarkerFaceColor','r')
plot(locs(2:2:end), pks(2:2:end), '^g', 'MarkerFaceColor','g')
hold off
grid
axis([0 5000 ylim])
legend('Force Plate Data', 'Right Foot', 'Left Foot', 'Location','E')
xlabel('Index')
ylabel('Force')
I plotted a portion of the data to show the details here. The code works for the entire data set.
The plot:
  72 Comments
Felipe Mattioni Maturana
Felipe Mattioni Maturana on 4 Mar 2018
Dear Star Strider,
I have been working on my force data using the codes you posted here. Everything worked perfectly so far. The only problem I have now is that I am analyzing data from an old Treadmill and it is quite noisy. The 50-N threshold is not working on this data set because between each strike there are usually two bumps on the data and it is often above 50 N. Would you have any suggestion on how I can overcome this issue? I am posting a figure and an example of my data (please, note that commas instead of dots might appear as decimal separators as I am using a German computer) to help you understand what is going on. Any help would be very much appreciated.
Best,
Felipe

Sign in to comment.

More Answers (1)

KSSV
KSSV on 30 Sep 2016
[data,txt,raw] = xlsread('1 Column Gait Data.xlsx');
% Right / odd numbered
right = data(1:2:end) ;
% left / even numbered
left = data(2:2:end) ;

Categories

Find more on Two y-axis 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!