Derivative of the right heel marker signal

In attachment are the data of the right heel. The right heel was followed by several camera's and gave the following data of its position. I want to know something about the velocity of the heel, so I need to take the derivative. How do I do this? Do I need to know the time of the movement? (in attachment is also the plot of the right heel).

 Réponse acceptée

Star Strider
Star Strider le 27 Déc 2014
I always use the gradient function to calculate numerical derivatives:
d = matfile('Sam_RHEE.mat');
RH = d.RHEE; % Data Vector (Right Heel)
T = 0:size(RH)-1; % Time Vector
dRH = gradient(RH,T); % Derivative (w.r.t. T, ‘T’ not required)
figure(1)
plot(T, RH)
hold on
plot(T, dRH*100)
hold off
grid
I calculate the numerical derivative with respect to a time vector if possible, and since you may have a time base, I created and included one here. The time vector is not necessary to use the gradient function.
In the plot, I multiplied the derivative, ‘dRH’ by 100 to make it more visible. I renamed your .mat file so I can keep track of it (among all the others I download here).

5 commentaires

Sam
Sam le 27 Déc 2014
Thanks a lot! I get a nice plot! A few more questions to get it right. Why do you create RH and don't you just you RHEE? And why is the time vector -1? Thanks.
My pleasure, as always!
I created ‘RH’ because I’m lazy. Replace ‘RH’ with ‘RHEE’.
‘T’ has the -1 because it starts with 0 and has to be the same length as ‘RHEE’. If you started it with 1 instead, it would be:
T = 1:size(RHEE);
I’m interested in your biomechanics research on stair walking. I would encourage you to include electromyograms as well eventually, and explore the differences in male and female hip, knee, and ankle joint angles and muscle use patterns. It seems that yours may be master’s or doctoral research. If you decide to publish it, I would be interested in reading it. (It would have to be translated into English for me.)
Sam
Sam le 27 Déc 2014
Indeed, I'm in my first Master-year. The datafiles I got are already from other doctoral researchers. I need to handle the datafiles (as an exercise) so I can get to know Matlab, because I chose 'Research' in my first Masteryear :). Oh well, it is pretty interesting though!
Sam
Sam le 27 Déc 2014
If I leave out d = matfile('RHEE') the code doesn't run as it should. How come?
Star Strider
Star Strider le 27 Déc 2014
‘Research’ is an excellent choice! As I understand it, the biomechanics of walking remains an active area of research.
As for learning MATLAB, there are several excellent tutorials, demonstration code and other resources available on the MathWorks Blogs site and in the File Exchange. For example, Image Analyst’s demonstration files will teach you everything you need to know about the essentials of image processing with the Image Processing Toolbox. I encourage you to look through them. I learned the essentials of computing decades ago, have used MATLAB for about the last 20 years, and am still learning it. (It keeps changing between releases, making that inevitable!)
Experiment with your MATLAB code. That is the best way to learn. We are here if you have problems, and will help you sort them out.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Biological and Health Sciences dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by