Gait cycle: start periodic function

11 views (last 30 days)
Lewis Bonduelle
Lewis Bonduelle on 9 Jul 2018
Answered: Elkyn Belalcazar on 10 Jul 2018
I have an array with values that are periodic. I have to plot one period of all this data. The problem that I have is that my period starts at knee_angle_r = 8 and there are multiple knee_angle_r = 8 in the same period. In my data there is a high peak that I can find with the code below. With this code it is easy to calculate the period length for any chosen period.
[pks,locs] = findpeaks(knee_angle_r, 'MinPeakHeight',55)
locs=locs.';
a = 2; %Chosen period
b = locs(a + 1)-locs(a); %Calculation of the period
Then I plot all the data by using plot(knee_angle_r) and trim it by using xlim(temp) where temp should be a matrix [StartPeriod StopPeriod]. I know that the peak that I have from earlier is arround 70% but because this isn't so for every person I can't use the following code.
temp = [locs(a)-0.7b locs(a)+0.3b];
plot(knee_angle_r)
xlim(temp)
Can anyone help me how to find StartPeriod (= +/-8 on plot (also have the array))? I was searching if it were possible by using 'MinPeakDistance' but didn't find the right answers. To make it more understandable I add a picture of the graph that I have obtained. It is important to me to find this because then other things can be seen on the graph (stance phase, swing phase etc.)
Thanks in advance!

Answers (1)

Elkyn Belalcazar
Elkyn Belalcazar on 10 Jul 2018
Hi, I think you have to find gait temporal parameters. I've worked with the angular velocity, in order to find this start period. If you want to talk about it: elkyn82@gmail.com

Community Treasure Hunt

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

Start Hunting!