Integration of displacement to velocity then acceleration

조회 수: 2 (최근 30일)
Adrienne
Adrienne 2014년 5월 15일
댓글: Sean de Wolski 2014년 5월 16일
I want to integrate this displacement vector (jh) to get velocity and then to get acceleration.
There are multiple trials of which I need to integrate from. when i do:
%%Calculation of Velocity and Acceleration
v= trapz (jh);
a= trapz (v);
this gives an output for the V but not for the A. When I do cumtrapz below:
%%Calculation of Velocity and Acceleration
v= cumtrapz (jh);
a= cumtrapz (v);
This is a cumulative integration and this is not what I want

채택된 답변

Sean de Wolski
Sean de Wolski 2014년 5월 15일
Don't you mean take the derivative of displacement with respect to time to get velocity and again for acceleration?
doc diff
  댓글 수: 4
Adrienne
Adrienne 2014년 5월 15일
편집: Adrienne 2014년 5월 15일
i still don't know what i've done wrong:
dt=tof*[1:1:jh];
x= (data(:,5));
y= (data(:,5));
vx= diff(jh)./dt;
Sean de Wolski
Sean de Wolski 2014년 5월 16일
I would guess you would want dt to be a column vector so it's the same shape and size as x and y and you will want to have it be the change in time, not absolute time.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by