Info

This question is closed. Reopen it to edit or answer.

How can I obtain the same quantities in matlab ode45 and simulink ode45?

1 view (last 30 days)
I'm solving the equations of motion in Matlab and Simulink for quadcopters. I use in Matlab the solver ode45 twice, one to obtain quantities in body axes and one to get the same in earth axes. About Simulink i don't use the blockset "Euler 6DoF" but i write the same equations using two integrators for the integrations. Whatever method in simulink, ode3,ode4,ode5 fixed step or default ode45 never changes the results. In Matlab I get almost the same numbers but also if I use 1million time step, and there's ever a difference. Is it normal that ode45 in simulink with less step size works better than matlab ode45 with much more steps?

Answers (0)

Community Treasure Hunt

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

Start Hunting!