Compiling .m files that call simulink models

3 ビュー (過去 30 日間)
Paul Maurais
Paul Maurais 2017 年 2 月 27 日
回答済み: Ankita Nargundkar 2017 年 3 月 6 日
Will a .m file that calls a simulink model using sim() sill compile and function properly using mcc?
Alternatively would compiling the simulink files to a dll, calling that dll from the .m file and then using mcc produce the desired results?

回答 (1 件)

Ankita Nargundkar
Ankita Nargundkar 2017 年 3 月 6 日
You cannot compile a .m simulink model that uses sim(). Here is the list of MATLAB Functions that cannot be compiled
You can use ert_shrlib.tlc if you have the Embedded Coder product to generate generic DLLs from your Simulink model. The relevant documentation is here: Shared Object Libraries This will compile simulink model to a dll and you can try calling the dll fro .m file and add references to it while compiling.
This is not a tested or well known method but you can give it a try.

カテゴリ

Help Center および File ExchangeMATLAB Compiler についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by