MATLAB problem using euler's explict method
3 次查看(过去 30 天)
显示 更早的评论

I have already solved the two second order ODE. Write the MATLAB codes to determine and plot the trajectory of the paratrooper for the first 10 seconds using the Euler’s explicit method. I am required to develop a user-defined MALTAB function for solving a generic system of 4 first-order ODEs. I also need a clear statement section at the head and proper commentary statements in the codes. Can I use ODE 45 as a part of my codes for this question?
0 个评论
回答(1 个)
Alan Stevens
2020-12-23
If you let dx/dt = vx, say, and dy/dt = vy, then the accelerations can be written as dvx/dt = -gamma/m*vx*sqrt(vx^2+vy^2), and dvy/dt = -g-...etc. You write a function that calculates the velocities and accelerations at an instant of time, and then returns them as a column vector to ode45. ode45 must call this function with a timespan and a vector with initial values for x, y, vx and vy.
doc ode45
for more detail.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!