MATLAB problem using euler's explict method

3 visualizaciones (últimos 30 días)
Shahab Ahmed
Shahab Ahmed el 23 de Dic. de 2020
Respondida: Alan Stevens el 23 de Dic. de 2020
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?

Respuestas (1)

Alan Stevens
Alan Stevens el 23 de Dic. de 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.
doc ode45
for more detail.

Categorías

Más información sobre Ordinary Differential Equations en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by