Help with integral function implmentation for movement data analysis
Show older comments
Hi everyone,
I just read a paper ('Sensitivity of smoothness measures to movement duration, amplitude, and arrests.') which included a metric for 'dimensionless jerk', which may be applied to movement data to determine movement smoothness. I am attempting to apply this metric to some numerical biological data I have collected for the motion of a particle in three dimensions. It has been awhile since I have done this so would be greatful to know if I have implemented the function correctly.
The function looks like this: http://latex.codecogs.com/gif.latex?(\int_{t_1}^{t_2}\dddot{x}(t)^2dt){D^5}/{A^2}
Where the triple derivative of x is acceleration data, A is distance travlled (already calculated) and D is t2-t1. t1 and t2 are the start and end of my data so do not require explicit specification.
I am implementing the code as follows:
// Vel1..Vel3 - logs of particle velocity (x,y,z)
// Accel = Derivative of combined velocity terms (I am not sure if this is correct)
Accel = diff(Vel_1(:,1).^2 + Vel_2(:,2).^2 + Vel_3(:,3).^2);
for (y=1:length(Ax))
Ax1(y) = Ax(y)*Ax(y); % square each element of Accel
end
D = length(Ax1); % Duration
A = Distance_Travelled1(Tn); % Movement amplitude (already calculated)
Dimensionless_Jerk1 = (trapz(Ax1)) * ((D.^5)/A.^2)
Does this look okay to you?
Any comments or suggestions welcome, at the moment my results vary quite signigicantly, with a magnitude range of e3-e10 for quite similar motions. Any help gratefully recieved. Apologies if I have missed any important details.
Answers (0)
Categories
Find more on Spline Postprocessing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!