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
Best Answer