MATLAB problem using euler's explict method
1 view (last 30 days)
Show older comments
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 Comments
Answers (1)
艾伦·史蒂文斯
on 23 Dec 2020
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.
docode45
for more detail.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!