The MEX file doesn't speed up the simulation
1 view (last 30 days)
Show older comments
Hi,
For speed up my simulation I generated the MEX file of Output_fcn.m (with Matlab coder).
The first image (below) is the profiler without the MEX file (originally version).
The second image (below) is the profiler replacing the function with the MEX file, but the total simulation time has increased so much.
Why the Self time of the MEX-file is very high?
The Output_fcn.m is not complex and inside it has simple assignments.
Edit: I added the Output_fcn.m script. Below the input
Many thanks
2 Comments
Rik
on 2 Jul 2020
I don't know how to diagnose this, but I can imagine it would be relevant to have the code in question. You can attach it to your question with the paperclip icon.
Answers (0)
See Also
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!