How to find the average velocity across positions in coordinates using a for loop
Mostra commenti meno recenti
I have two variables that both consist of column vectors with 3000 rows. One are X coordinates and the other are Y coordinates. I am trying to find the average velocity over a given time that these coordinates were collected. I figured a for loop would work best given the amount of data that is here. I am struggling to figure out how i can find the distance from position 2 to 1, 3 to 2, 4 to 3......3000 to 2999, and have this run in the for loop. P is currently just a place holder I have used to say position. Any help would be great thank you!
for i = 1:2999
P(i+1)-P(i);
end
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Loops and Conditional Statements in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!