what should i do to to evaluate the total length of a trajectory obtained as the sum of the distances of a point from the next??

7 views (last 30 days)
Hello everyone, I'm working on my specialist degree thesis (Biomedical Engeenering) and I have to evaluate many parametres about length,velocity,acceleration,mean frequency and others. Expecially I need an Help for evaluating these parametres with Matlab ( I never used the programming language Matlab and I'm very worried about my work thesis ):
  1. Item one: *the total length of a trajectory obtained as the sum of the distances of a point frome the next:*L=∑_(i=1)^(n-1)▒√(〖(AP[i+1]-AP[i])〗^2+〖(ML[i+1]-ML[i])〗^2 ) where AP (antero-posterior) and Ml(medio-lateral) represent 2 different directions where the points are localized.
  2. Item two _ * The length AP is the sum of the absolute distances between two consecutive points towards AP direction*_Lap= ∑_(i=1)^(n-1)▒|AP[i+1]-AP[i]|
How this can be done on Matlab???? thanks in advance

Accepted Answer

Thorsten
Thorsten on 15 Oct 2015
If AP and ML are vectors, you can use
L = sum(sqrt(diff(AP).^2 + diff(ML).^2));
Lap = sum(abs(diff(AP)))
  4 Comments
Torsten
Torsten on 15 Oct 2015
Edited: Torsten on 15 Oct 2015
You overlooked that AP and ML are points with two coordinates x and y ...
Best wishes
Torsten.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!