Simulink上でexeファイルを利用したい

6 views (last 30 days)
Kento SHIRAKATA
Kento SHIRAKATA on 19 Dec 2019
Answered: Toshinobu Shintai on 20 Dec 2019
タイトルどおりです.
mファイルでは,
system('aaa.exe >> bbb.txt')
といった形でexeファイルが実行できますが,simulinkではsystemはコード生成でサポートされていないとエラーが出ます.
なにか方法はありませんか?

Accepted Answer

Toshinobu Shintai
Toshinobu Shintai on 20 Dec 2019
MATLAB Function内で「system」というコマンドをコード生成対象から除外することで実行できるようになります。
以下のようにcoder.extrinsicを記述すると、除外することができます。
function y = fcn(u)
coder.extrinsic('system')
system('tree');
y = u;
end

More Answers (0)

Categories

Find more on モデル コンポーネントのスケジュール 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!