필터 지우기
필터 지우기

Calcul Speed, Position by acceleration with an accelerometer

조회 수: 14 (최근 30일)
roux terence
roux terence 2016년 5월 31일
편집: James Tursa 2016년 6월 1일
Hello everybody,
I would like to calculate the speed and the position with acceleration datas. Does exist a command to calculate this ?
I'm using currently a for
for i = 1:length(Acc_X);
Vit_X(i)= (Acc_X(i))*(t(i+1)-t(i));
Pos_X(i) = 0.5*Acc_X(i)*((t(i+1)-t(i))^2);
end
If someone can help me.
Thanks

답변 (1개)

James Tursa
James Tursa 2016년 6월 1일
편집: James Tursa 2016년 6월 1일
Well, what you are currently calculating are changes in velocity and changes in position, i.e. delta-v and delta-p. To do get velocity and position using your Euler scheme you need to add these up incrementally. You could use a loop for this or you could use the cumsum function. Also, your loop will only work if the t array is larger than your Acc_x array.

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by