question about euclidean distance.
Afficher commentaires plus anciens
I want to find a function which can calculate the 3 dimension euclidean distance.
I have 9 arrays: Dx; Vx; ax; Dy; Vy; ay; Dz; Vz; az. the size of 9 arrays are the same.each array is 1*100000
the start point x0 =(Dx(1) Dy(1) Dz(1)) = (100 150 125)
How can I creat a function/script to run the following function:
x = Dx + Vx*t + 1/2*ax*t^2;
y = Dy + Vy*t + 1/2*ay*t^2;
z = Dz + Vz*t + 1/2*az*t^2;
t = 2; % it is fixed
L = ((x(n)-x(n-1))^2+(y(n)-y(n-1))^2+(z(n)-z(n-1))^2)^(1/2);
Thanks for your time and helping. :D
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!