How Can I Run a Mex file in Simulink
6 次查看(过去 30 天)
显示 更早的评论
On the script, the mex.file that are working wel but,l
Is there a solution for not recognizing the mex file in the syntax using the matlabfunction block on Simulink?
0 个评论
回答(1 个)
Monisha Nalluru
2020-9-17
编辑:Monisha Nalluru
2020-9-17
In MATLAB function block the compiler expects the MATLAB code, but when it comes to mexfile, finds the code in binary mex file, which it cannot handle.
So add the below code in MATLAB function block bbefore calling mex file
coder.extrinsic('mex_filename');
If you declare it extrinsic, the compiler never tries to compile mexfile, just sets up a call to it.
1 个评论
Fayez Alruwaili
2021-3-23
编辑:Fayez Alruwaili
2021-3-23
This is very slow, is there any alternative way doing it?
Thanks
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!