Can we call a m-script during model simulation ?:
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ajay Pherwani
le 11 Fév 2014
Commenté : Ajay Pherwani
le 17 Juin 2014
I want to run a script , which will update some of my parameters in the workspace. Is it possible to call a m-script during model simulation .
I have heard of call back functions like StartFnc and CloseFcn,
But my concern is, when a block is hit (active) in simulation , Can we can a script at that particular point ?
Is there any matlab block in simulink to call a m-script ?
2 commentaires
Azzi Abdelmalek
le 11 Fév 2014
Do you want to change some parameters in your Simulink model during simulation?
Réponse acceptée
Azzi Abdelmalek
le 11 Fév 2014
Modifié(e) : Azzi Abdelmalek
le 11 Fév 2014
You can control your simulink model from a script file
set_param('modelname', 'SimulationCommand', 'start') % To start your simulation
% Then change your parameters in workspace
set_param('modelname', 'SimulationCommand', 'update') % will update your Simulink parameters
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!