Effacer les filtres
Effacer les filtres

How to use Eulers angle and ode45 to generate trajectory of aircraft

2 vues (au cours des 30 derniers jours)
Jose Camorlinga Medina
Jose Camorlinga Medina le 15 Nov 2018
I am having trouble setting up Euler angles into the ode45 command.

Réponses (1)

Amir Kleiner
Amir Kleiner le 15 Nov 2018
if you need to enter any kind of additional input into the function you are solving with any of the ode45 (or any other ode solver) you can do it in the following way:
First of all you should define your function with 3 input vectors.
dy = yourFunction(t, y, par)
the 3rd vector can be any type of array, which then you can use as you wish inside you function.
Then when you try to solve the ode system you first have to define the "par" array and call ode45 in the following way:
par = %whateve you like
[t, y]=ode45(@(t,y) yourFunction(t,y,par), tspan, y0, par)
hope this helps. If you upload your code the answer could be better :)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by