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

7 次查看(过去 30 天)
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

采纳的回答

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
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