Convert Equation to matlab

Hello i want to convert this equation (see the attached image) to matlab commands.

5 comentarios

Torsten
Torsten el 7 de Sept. de 2022
Editada: Torsten el 7 de Sept. de 2022
Maybe we can help if you tell us in what form you can supply ACCL_AP, ACCL_ML and/or the respective time derivatives (vectors together with a time vector, explicit functions of t,...) .
chris pamp
chris pamp el 7 de Sept. de 2022
Movida: Steven Lord el 7 de Sept. de 2022
Thank you for your comment. Please find attached a dataset.
David Hill
David Hill el 7 de Sept. de 2022
Your need to explain the data. What is X, Y, Z? Is a time stamp listed? What does the double decimal annotation mean?
chris pamp
chris pamp el 7 de Sept. de 2022
Editada: chris pamp el 7 de Sept. de 2022
X Y Z is the acceleration in of the axis and the first column refers to time
Torsten
Torsten el 7 de Sept. de 2022
How to get ACCL_AP, ACCL_ML from the data ? What does the double decimal annotation mean? The time in column 1 seems to be constant.

Iniciar sesión para comentar.

Respuestas (1)

William Rose
William Rose el 7 de Sept. de 2022

1 voto

This is motion capture or force plate data. AP, anterior-posterior. ML, medial-lateral. The jerk is numerically integrated over a fixed interval. acc=1+randn(100,2); %2 columns of simul WCCSP data %col 1=AP, col 2=ML dT=0.01; %sampling interval=.01 in this example jk=diff(acc)/dT; %instantaneous jerk
Sorry, can’t finish now, and not good typing on a phone. More later.

1 comentario

William Rose
William Rose el 8 de Sept. de 2022
Editada: William Rose el 8 de Sept. de 2022
[edit: correct typos in the text; code is unchanged]
The equation figure which you posted appears in Mancini et al 2012 and in Mancini et al 2010. This measure was proposed 25 years before that by Flash & Hogan 1985.
I assume you will integrate for the duration of your sway trial, as Mancini et al did. Flash & Hogan integrated from t=0 to t=end of a defined movement task. Mancini et al do not specify t (upper limit of integration). They used 2 minute sway trials, so I assume they integrated from t=0 to 120 seconds.
First let us create some simulated acceleration (AP and ML) data. The mean value of acceleration = 1 in this simulation, for AP (column 1) and for ML (column 2). You will use your own data.
acc=1+0.1*randn(100,2); %simulated acceleration (m/s^2) col 1=AP, col 2=ML
dT=0.01; %sampling interval (s)
jerk=0.5*sum(diff(acc(:,1)/dT).^2+diff(acc(:,2)/dT).^2); %jerk
fprintf('Jerk = %.1f m^2/s^5.\n',jerk);
Jerk = 20052.2 m^2/s^5.
In the code above, diff(acc(:,1)/dT) is the time derivative of AP accel., and diff(acc(:,2)/dT) is the time derivative of ML accel. Each one is then squared and the results are summed. Then they are multiplied by 0.5.
I am not a fan of the jerk measure as defined by Mancini et al. I would have normalized it by the integration time. Without such normalization, the value scales linearly with test duration. Test duration does not give insight into the subject's motor control, so why so define a measure that scales with test duration? I realize that if you use the same test duration in all your subjects, then you can use it to compare subjects. But it makes it difficult to compare results across different reearch groups or projects - or impossible if the integration time is not specified clearly, and it is not, in the Mancini papers.
Mancini et al should not have called it jerk. Jerk is well defined as the derivative of acceleration. Its MKS units are m/s^3. It is a vector, like acceleration. Flash & Hogan did not call their quantity jerk, because they knew better. It is the time integral of the squared magnitude of jerk. Its MKS units are m^2/s^5. It is a scalar. It is clearly not jerk.
Try the code above, modified to suit your data. Good luck with your work.

Iniciar sesión para comentar.

Categorías

Más información sobre Programming en Centro de ayuda y File Exchange.

Preguntada:

el 7 de Sept. de 2022

Editada:

el 8 de Sept. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by