mfile version of Simulink integrator
Show older comments
I'm running a simulation model in Simulink and I want to transform it over to m-code. In my Simulink model I use an integrator and to be sure I was making my m-code correctly I took time-stepped data on both sides of the integral and compared to when I ran those points through my m-code. Sadly they did not match up.
The solver I am using in Simulink is ode3 ... does anyone know the formula for the integrator block in Simulink using an ode3 solver?
BTW, I do not have the toolboxes to do code generation from simulink.
3 Comments
Ryan G
on 16 Jul 2013
Why do you want to convert a model to m-code?
Scott Hansen
on 17 Jul 2013
Jorge Gustavo Vazquez Duran
on 23 Nov 2016
hi man, i don´t have a solution but i have the same problem like you.
did you solve this or keeping it??
thanks.! regreat!!
Answers (1)
Guy Rouleau
on 16 Jul 2013
0 votes
This should get you started:
You might also be interested to look at the code for the ode3.m function in MATLAB.
1 Comment
Scott Hansen
on 17 Jul 2013
Edited: Scott Hansen
on 17 Jul 2013
Categories
Find more on General Applications in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!