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

4 Ansichten (letzte 30 Tage)
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 Kommentar
chrisw23
chrisw23 am 22 Aug. 2022
I think in Matlab runtime mode you also have to call a compiled simulink model.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Steven Lord
Steven Lord am 22 Aug. 2022
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 Kommentare
Sabereh
Sabereh am 24 Aug. 2022
I want to run the simulink from my exe app.
Sabereh
Sabereh am 24 Aug. 2022
Thank you very much for the solution. I deleted the slprj folder and tried again. The solution works.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Walter Roberson
Walter Roberson am 22 Aug. 2022
This is a documented limitation of MATLAB Compiler. You need to use Simulink Coder to compile Simulink to an executable.

Kategorien

Mehr zu Simulink Coder finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by