Simulink versus Matlab implementation?

17 views (last 30 days)
Tolutola
Tolutola on 23 Jan 2013
I tried implementing several algorithms with both simulink and pure matlab code. On all occasions, the simulink version was faster. I would like to know why this is so and how I can exploit this further for fast and robust implementations.
Thanks.

Answers (1)

Andreas Goser
Andreas Goser on 23 Jan 2013
This is too generic to give a good statement. Some considerations:
MATLAB vs. Simulink implementation is typically a question of the type of application and the deliverable. I have not worked with many people that compared performance.
When performance is important for you, then probably other considerations are more valuable. In any case, "faster" can mean 112 s instead of 115 s (noise) or 112 s instead of 2241124 s (drama).
Bottom line: Please describe as much as you can of your planned application and what you are comparinf and how
  2 Comments
Tolutola
Tolutola on 23 Jan 2013
Edited: Tolutola on 23 Jan 2013
sorry for the poor description. Speed becomes very critical when you are trying to model a new process and you'll like to observe the sensitivities of the output to several dozen parameters. I'm modeling bioelectrochemical systems and a good speed/accuracy balance is essential. This I seem to get from simulink. moreover, in the design of control strategies, you'd like to have to the model run faster. The speed difference is very significant (at least twice and up to several orders of magnitude especially when the model is stiff)
I would like to know how I can further maximize this with simulink. I presently use a lot of embedded matlab function blocks, a few unavoidable algebraic loops and some other basic blocks.
Andreas Goser
Andreas Goser on 25 Jan 2013
OK, so the goal is to speed up. If you have a workign MATLAB application, I would more looking in parallel and distributed computing as towards Simulink. In both cases, MathWorks engineers will assist you if you engange with them. You may start calling Technical Support.

Sign in to comment.

Categories

Find more on Simulink Functions in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!