Calculate the velocity for each time increment using displacement and time using a for loop?

3 views (last 30 days)
displacement = [3.01, 3.02, 3.03, 3.04, 3.05,3.06]
time = [1, 1.01, 1.02, 1.03, 1.04,1.05]

Answers (1)

KSSV
KSSV on 20 Jan 2022
velocity = gradient(displacement)./gradient(time)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!