Performance of ode solvers in Matlab and Simulink
I have implemented a simulation of a system with around 20k states in Simulink via a Matlab System using iterpreted execution (since I was lazy, I used simbolic variables in the setupImpl() function for deriving the stepImpl() function more easily). The model simulates rather slow, and thus I am thinking on what to do next to improve performance. I thought about
1) rewrite the matlab system such that I can use code generation for execution
2) use the obj.stepImpl() function in the workspace and call there an ode solver.
Do you have a guess which of the options is going to show better performance? Are there any advantages of both options? Option 2) would be much easier for me to implement.
Thanks in advance!I have implemented a simulation of a system with around 20k states in Simulink via a Matlab System using iterpreted execution (since I was lazy, I used simbolic variables in the setupImpl() function for deriving the stepImpl() function more easily). The model simulates rather slow, and thus I am thinking on what to do next to improve performance. I thought about
1) rewrite the matlab system such that I can use code generation for execution
2) use the obj.stepImpl() function in the workspace and call there an ode solver.
Do you have a guess which of the options is going to show better performance? Are there any advantages of both options? Option 2) would be much easier for me to implement.
Thanks in advance! I have implemented a simulation of a system with around 20k states in Simulink via a Matlab System using iterpreted execution (since I was lazy, I used simbolic variables in the setupImpl() function for deriving the stepImpl() function more easily). The model simulates rather slow, and thus I am thinking on what to do next to improve performance. I thought about
1) rewrite the matlab system such that I can use code generation for execution
2) use the obj.stepImpl() function in the workspace and call there an ode solver.
Do you have a guess which of the options is going to show better performance? Are there any advantages of both options? Option 2) would be much easier for me to implement.
Thanks in advance! ode, simulink, performance, code generation, interpreted execution, matlab system MATLAB Answers — New Questions