Can't make .exe file from Appdesigner that include simulink model

조회 수: 2 (최근 30일)
Sabereh
Sabereh 2022년 8월 22일
댓글: Sabereh 2022년 8월 24일
I have an appdesigner code.I want a simulink model run when push bottun but after making .exe file this error occur:
(Matlab 2021b)
here is the code:
function startupFcn(app)
h = load_system('test');
test()
end
% Button pushed function: runButton
function runButtonPushed(app, event)
simout = sim('test');
end
end
  댓글 수: 1
chrisw23
chrisw23 2022년 8월 22일
I think in Matlab runtime mode you also have to call a compiled simulink model.

댓글을 달려면 로그인하십시오.

채택된 답변

Steven Lord
Steven Lord 2022년 8월 22일
See this page from the documentation for Simulink Compiler for an example of how to deploy a standalone application that calls a Simulink model.
  댓글 수: 4
Sabereh
Sabereh 2022년 8월 24일
I want to run the simulink from my exe app.
Sabereh
Sabereh 2022년 8월 24일
Thank you very much for the solution. I deleted the slprj folder and tried again. The solution works.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Walter Roberson
Walter Roberson 2022년 8월 22일
This is a documented limitation of MATLAB Compiler. You need to use Simulink Coder to compile Simulink to an executable.

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by