Effacer les filtres
Effacer les filtres

how to automatically configure the sim parameter

1 vue (au cours des 30 derniers jours)
wenchao zhang
wenchao zhang le 7 Juil 2023
Commenté : wenchao zhang le 8 Juil 2023
when i run the following command in command window, matlab version 2019a
sim('untitled','StartTime','0.0','StopTime','20.0','SolverType','Fixed-step','FixedStep','0.5');
the result shows the model simulation parater not changed, any one knows what's the reason, and how to solve it.

Réponse acceptée

Nitya Patel
Nitya Patel le 7 Juil 2023
You can use the set_param function to set these parameters before running the sim function. Something like below:
set_param('model_name', 'SolverType','Fixed-step');
sim('model_name');
You can set all the parameters individually and run sim at the end.
Documentation:
  3 commentaires
Nitya Patel
Nitya Patel le 7 Juil 2023
You can use the save_system function to save the model after making changes.
wenchao zhang
wenchao zhang le 8 Juil 2023
ok

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

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

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by