How to calculate the projection of point onto a line

조회 수: 11 (최근 30일)
Elisa Iovene
Elisa Iovene 2021년 3월 3일
댓글: darova 2021년 3월 5일
Hello,
I would like to calculate the trajectory volatility (TV) defined as the standard deviation between the real trajectory and the ideal trajectory.
The formula is the following:
where xi (i= 1,2,3...N, the order of point on the trajectory) is the actual measurement point sampled from the trajectory, and pi is the corresponding projection onto the ideal trajectory as shown in the pic
Both actual and ideal trajectories are 100x3 matrices of x,y and z coordinate.
Here a pic for a better understanding:
(purple one actual, green line ideal)
Do you have any suggestion on how to do calculate pi, so the projection on the ideal trajectory given xi?
Thanks!
  댓글 수: 4
darova
darova 2021년 3월 4일
Do you have line parameters?
Elisa Iovene
Elisa Iovene 2021년 3월 4일
Yes, I have!

댓글을 달려면 로그인하십시오.

답변 (2개)

Alan Stevens
Alan Stevens 2021년 3월 3일

darova
darova 2021년 3월 4일
Here are some exaplanations
Let be some point on the line
cross product:
distance you want:
Let me know if you need more explanations or some example
  댓글 수: 2
Elisa Iovene
Elisa Iovene 2021년 3월 4일
Thank you for the answer!
I still have some doubts:
  1. Ai is a random point on my real trajectory?
  2. Should Ai change if I choose another xi?
  3. Since I have 3D points, should I apply the formula you mentioned, considering each axis separately?
darova
darova 2021년 3월 5일
  1. Yes, is any point on a real trajectory
  2. No, you don't need to choose another
  3. What do you mean by "each axis separately"?
Sorry, i forgot you to explain: component is needed to create unit vector. So point here is another point on the line

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by