How to apply velocity + acceleration to a position?
2 ビュー (過去 30 日間)
古いコメントを表示
Thank you all.
採用された回答
Youssef Khmou
2014 年 11 月 27 日
編集済み: Youssef Khmou
2014 年 11 月 27 日
@Roger gave the solution (Vx,Vy) . try to write a feedback of this solution.
t=0:100e-3:20;
V0x=1000;
Alpha=0.0004;
Beta=0.25;
Vx=1./(Alpha*t+(1/V0x));
Vy=(10/Beta)*(exp(-Beta*t)-1);
x0=10;
y0=15;
x=x0+(1/Alpha)*(log(V0x*Alpha*t+1));
y=(10/Beta)*(-(exp(-Beta*t)/Beta)-t)+y0+(10/Beta^2);
figure; plot(x,y)
title(' Particle Trajectory')
xlabel('x');
ylabel('y');
0 件のコメント
その他の回答 (2 件)
Roger Stafford
2014 年 11 月 26 日
You can approach this problem two ways. One is symbolic and other is numeric. As you are probably aware, you have two entirely independent differential equations here which simplifies things both for the numeric and symbolic methods.
For the symbolic approach you can either use matlab's 'dsolve' function to obtain analytic expressions for x and y versus time t, or you can use your calculus to solve these differential equations by hand. The latter is simple to do. For example, your equation
dvx/dt = -0.0004*vx ^2
can be expressed as
=1/vx^2*dvx = 0.0004*dt
and both sides can easily be integrated.
For the numeric approach you can set up these differential equations to be solved using one of the 'ode' functions. Read about them at:
http://www.mathworks.com/help/matlab/math/ordinary-differential-equations.html
0 件のコメント
Youssef Khmou
2014 年 11 月 26 日
You can verify this primary solution theoretically :
t=0:100e-3:20;
V0x=1000;
Alpha=0.0004;
Beta=0.25;
Vx=1./(Alpha*t-V0x);
Vy=exp(-Beta*t)+10/Beta;
If it is correct, you can integrate for second time to get (x,y)
5 件のコメント
Roger Stafford
2014 年 11 月 27 日
I assume that the symbol 'Vxi' means the same as 'x'. If so, I don't quite agree with your result.
What we have already obtained is the equation
vx = dx/dt = 1/(0.0004*t+0.001)
as the result of the first integration. To find x as a function of t, we need to integrate the expression on the right hand side. Its integral is:
x = 1/0.0004*log(0.0004*t+0.001) + C
where C is the appropriate constant of integration. If you want x to be zero when t is zero, then C must be -1/0.0004*log(0.001), which then gives the final answer of:
x = 1/0.0004*log(0.0004*t+0.001) - 1/0.0004*log(0.001)
= 1/0.0004*(log(0.0004*t+0.001)-log(0.001))
= 1/0.0004*log((0.0004*t+0.001)/0.001)
= 2500*log(0.4*t+1)
Your expression for 'y' ('Vyi') looks basically correct except that it is equal to -160 when t is zero. It needs to have a constant of integration of 160 added if you want it to be zero when t is zero.
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!