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

タイトルどおりです.
mファイルでは,
system('aaa.exe >> bbb.txt')
といった形でexeファイルが実行できますが,simulinkではsystemはコード生成でサポートされていないとエラーが出ます.
なにか方法はありませんか?

 Accepted Answer

Toshinobu Shintai
Toshinobu Shintai on 20 Dec 2019

0 votes

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!