Simulink SImulation Inputs and Model Variables
Mostrar comentarios más antiguos
I want to run a model for different input parameters, using an arraySimulink.SimulaitonInput Objects.
In the StopFcn of the Model I want to read some of the model parameters and variables set by the simulink.SimulationInput objects.
To access the parameters I can call
get_param(gcs,'Parameter')
to get the value of the parameter as set by the Simulink.SimulationInput object.
However to access variables of the model I would need to do:
mdlWks = get_param(gcs,'ModelWorkspace');
Variable = getVariable(mdlWks,'Variable');
This however only gives me the default version of the value for Variable. I waat the current set value of Variable though. Is there an alternative get_var function or something that can do this?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Programmatic Model Editing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!