MATLAB Function Versus MATLAB S-Function (processing speed)
Mostra commenti meno recenti
My problem is a simple example in the picture.
Top S-function written in C++. Lower Matlab function written in Matlab. Blocks of the same function, but the top is 4 times faster! Why? Maybe this is due to the creation of the wrapper in the case of the lower block? M-code consists of five lines, and 800 lines of the wrapper. wrapper slows down speed of model?
Risposte (1)
Kaustubha Govind
il 25 Feb 2013
0 voti
It could be that you have Enable debugging/animation enabled in the 'Simulation Target' pane of the Configuration Parameters window. If you disable this (and perhaps even overflow detection and memory integrity checking), it should cut down the size of the generated code, and improve the speed of the MATLAB Function block.
1 Commento
Ivan
il 26 Feb 2013
Categorie
Scopri di più su Simulink Coder in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!