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

1 view (last 30 days)
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?

Accepted Answer

Sulaymon Eshkabilov
Sulaymon Eshkabilov on 17 Jun 2019
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.

More Answers (0)

Categories

Find more on Programmatic Model Editing in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!