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

2 vues (au cours des 30 derniers jours)
Udhaya K
Udhaya K le 16 Juin 2019
Commenté : Udhaya K le 17 Juin 2019
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?

Réponse acceptée

Sulaymon Eshkabilov
Sulaymon Eshkabilov le 17 Juin 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.

Plus de réponses (0)

Catégories

En savoir plus sur Programmatic Model Editing dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by