solving systems of second order differential equations with initial conditions and plotting
이전 댓글 표시
Sorry, I'm completely new to matlab.
I have to solve a system of odes as follows:
x''=-0.003467*x'*((x')^2+(y')^2)^(1/2),
y''=-0.003467*y'*((x')^2+(y')^2)^(1/2)-9.8,
with initial conditions:
x'(0)=160000/3600,
y'(0)=0,
x(0)=0,
y(0)=80,
where x'(t) and y'(t) are the speed in the x direction and y direction,
I have to find what t and x(t) is when y(t)=0, and plot the trajectories.
The anser should be t=4.44s, x(t)=148m.
I tried typing in:
syms x(t) y(t)
S = dsolve(diff(x,2)==-0.003467*diff(x)*((diff(x))^2+(diff(y))^2)^(1/2),diff(y,2)==-0.003467*diff(y)* ((diff(x))^2+(diff(y))^2)^(1/2)-9.8,diff(x(0))==160000/3600,diff(y(0))==0,x(0)==0,y(0)==80)
and what I get was:
Error using mupadengine/feval (line 157)
MuPAD error: Error: The equations are invalid. [ode::new]
Error in dsolve>mupadDsolve (line 328)
T = feval(symengine,'symobj::dsolve',sys,x,options);
Error in dsolve (line 189)
sol = mupadDsolve(args, options);
I know there must be some mistake for I'm completely new to matlab.
Can someone please help me?
답변 (1개)
Orion
2014년 10월 15일
0 개 추천
카테고리
도움말 센터 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!