Calculating velocity from existing data
9 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I am new to MATLAB and need your help.
How can i calculate the velocity when given the displacement in X and Y direction. the Data are shown in the table below:
TIME X Y
____ ____
0 0 0.25
4 4 0.25
9 9 0.2
14 14 0.15
24 19 0.05
29 24 0
34 29 0
39 34 0.1
44 39 0.3
Best Regards, Youssef
1 件のコメント
Walter Roberson
2020 年 6 月 21 日
Are we to assume smooth acceleration, or should we assume that an instantaneous impulse is applied at each of the listed times?
If we are to assume smooth acceleration, using which model?
As we are to be able to calculate velocity given displacement, and the displacements given might not be any of the ones exactly listed, are we to assume that there is some kind of potential field that is imparting acceleration, and we are to estimate what the field looks like, so that we could predict what the acceleration would be for any given X, Y pair? If so then then it would be necessary to take into account cummulative acceleration in order to figure out the acceleration at the points -- and we would not be able to tell you about velocity at given X, Y points becaused that would depend upon velocity traveling to the point.
回答 (1 件)
Star Strider
2020 年 6 月 21 日
Try this:
M = [ 0 0 0.25
4 4 0.25
9 9 0.2
14 14 0.15
24 19 0.05
29 24 0
34 29 0
39 34 0.1
44 39 0.3];
T1 = array2table(M, 'VariableNames',{'Time','X','Y'});
PosXY = hypot(T1{:,2},T1{:,3});
VelXY = gradient(PosXY)./gradient(T1{:,1});
T2 = table(PosXY,VelXY, 'VariableNames',{'Position','Velocity'});
T1 = [T1, T2]
producing:
T1 =
9×5 table
Time X Y Position Velocity
____ __ ____ ________ ________
0 0 0.25 0.25 0.93945
4 4 0.25 4.0078 0.97247
9 9 0.2 9.0022 0.9993
14 14 0.15 14.001 0.66652
24 19 0.05 19 0.66661
29 24 0 24 0.99999
34 29 0 29 1
39 34 0.1 34 1.0001
44 39 0.3 39.001 1.0002
.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!