Runge Kutta 4 for slingshot simulation.

Hey everyone, I would like some help with using Runge Kutta 4 (or if there's a better a way) to solve these differential equations. (image attached) I wonder if it's possible to solve it using RK4?

Answers (1)

Torsten
Torsten on 6 Jan 2016
help ode45
Best wishes
Torsten.

4 Comments

Hey, there. Thank you for taking the time to answer. However, could you explain your answer a little bit?
Torsten
Torsten on 6 Jan 2016
Edited: Torsten on 6 Jan 2016
It means:
Look at the documentation of the MATLAB ODE-solver suite:
It contains examples on how to solve systems of ordinary differential equations like yours.
The name of one of these solvers is "ode45".
Best wishes
Torsten.
Yes I know the help function. But do you think this one you gave is better than Runge Kutta? And is ode45 the best for my exact equations?
If you want to solve only 4 ODEs, every solver of the ODE-suite will be fine if you set RelTol and AbsTol to small enough values.
And I'm convinced that every solver of the ODE-Suite will behave better than a self-programmed Runge-Kutta.
Best wishes
Torsten.

Sign in to comment.

Asked:

on 6 Jan 2016

Commented:

on 7 Jan 2016

Community Treasure Hunt

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

Start Hunting!