From Acceleration to Displacement Trapz Function
5 views (last 30 days)
Show older comments
Hello,
I have the acceleration values as a vector and I need to integrate it to get velocity and displacement via Trapz function. trapz(acc) gives a value for V but how can i reach to the displacement value? Is there any way to integrate 2 times ? When i integrate V value it naturally gives me zero.
Thank you.
0 Comments
Answers (2)
Mahdi
on 23 May 2014
% Defined Acceleration values as Accel, Time is the steps of time
velocity=cumtrapz(Time, Acceleration)
Displacement=cumtrapz(Time, Velocity)
Or you can use the combination of cumtrapz and trapz to fit which solution you want.
2 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!