フィルターのクリア

Confusion using cumtrapz for acceleration

2 ビュー (過去 30 日間)
Bran
Bran 2014 年 9 月 16 日
コメント済み: A Jenkins 2014 年 9 月 17 日
I have data for a person swinging their leg back and forth, I have this data in the form of acceleration. I have tried using cumtrapz to turn this data into displacement.
ie Vel = vel0 + cumtrapz(t,Acc)
Pos = pos0 + cumtrapz(t,Vel)
however I get a graph that is increasing only, no osccilations, I am confused, is cumtrapz dealing with the negative accelerations accurately?
any ideas about how to tackle this problem?
  1 件のコメント
A Jenkins
A Jenkins 2014 年 9 月 17 日
If you would provide some sample data it would help people reproduce your problem.
I made up my own data but your code seems to work just fine:
t=0:0.1:10;
Acc=sin(t);
vel0=-1;
pos0=0;
Vel = vel0 + cumtrapz(t,Acc)
Pos = pos0 + cumtrapz(t,Vel)
plot(t,Acc,t,Vel,t,Pos)
legend('Acc','Vel','Pos')

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeDirected Graphs についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by