Model Settings / Configuration parameters updating using script

9 vues (au cours des 30 derniers jours)
Oldrich
Oldrich le 15 Fév 2024
Commenté : Oldrich le 7 Mar 2024
For the automated simulation purposes, I need to update Model Settings / Configuration parameters updating using script. Mainly Input and Start time, Stop time. Is there any option how to do it?

Réponses (1)

Fangjun Jiang
Fangjun Jiang le 15 Fév 2024
set_param(mdl,"StartTime","10","StopTime","40")
Hover your mouse over the property (e.g. Input), right click, select "What's this?". It will bring up a help page where you can find the programming property name. Then use get_param() and set_param().
  3 commentaires
Fangjun Jiang
Fangjun Jiang le 26 Fév 2024
set_param(mdl,"LoadExternalInput","on","ExternalInput","[t,u]")
Oldrich
Oldrich le 7 Mar 2024
thank you very much for your helpful anwer, it works as I expected

Connectez-vous pour commenter.

Catégories

En savoir plus sur Model, Block, and Port Callbacks dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by