How to save simulink model together with inputs given in matlab file?

2 次查看(过去 30 天)
I have a simulink file whose input values are given in matlab file. When I save simulink and reopen it later, I am asked to enter the input values in matlab file once again. Is there a way to integrate a simulink and matab file together?

采纳的回答

Sulaymon Eshkabilov
Hi,
Input arguments/variable values can be inserted within your simulink model in your case via Callbacks that can be accessed with the followings in your Simulink model window:
File -> Model Properties -> Callbacks -> InitFcn -> (Specify your inpur variables in the tab) Model initialization function
By this way, you would carry all input data along with your simulink model.
Good luck.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programmatic Model Editing 的更多信息

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by