Use of Simulink-generated MEX function within MATLAB
5 views (last 30 days)
Show older comments
Assume that you have a MATLAB function that generates a waveform (vector A) and a Simulink model that represents a combination of filters.
Is there any way, by which, the Simulink model can be invoked through MATLAB as a MEX function (eg B = sim_func_mex(A)) in order to pass the waveform through the filters and obtain the output (vector B) WITHOUT opening Simulink (ie without issuing a sim() command) and without requiring a Simulink license?
This scenario is very common, where a number of people need to work on a MATLAB function but DO NOT need access (i.e. they do not need to view/modify) the Simulink model.
Any help would be very much appreciated.
Regards, Ioannis
0 Comments
Answers (2)
Titus Edelhofer
on 16 Apr 2015
Hi Ioannis,
if you have Simulink Coder available, you can convert your Simulink model to C Code (and create either an executable or a dll). This you (other users) can call then from MATLAB without the need of Simulink. What you need though is the license for Simulink Coder ...
Titus
0 Comments
Ioannis Sarris
on 16 Apr 2015
1 Comment
Simon Meyer
on 28 Sep 2020
Hello Ioannis,
currently I am struggeling with the same problem. I know this post is pretty old, but did you find any good way to solve this issue, or can you give any advice for me?
Thank you very much!
Simon
See Also
Categories
Find more on Model Verification 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!