MATLAB: Can’t I tune a tunable parameter during Simulation

mask parameterssimulinksubsystemssusbsystems

Hello,
I have a masked subsystem model with some parameters I set as tunable, in order to be able to tune these parameters during simulation. However when I start the simulation none of the parameters are enabled.
Can anyone help me out with this? Is there any other settings to change to make them tunable?
Thank you!

Best Answer

If you defined a tunable parameter in your masked subsystem and it is not enabled to tune while executing you should check if the Inline Parameters check box in the configuration parameters is checked.
(Model Window > Simulation > Configuration Parameters > Optimization > Signals and Parameters > Simulation and Code Generation)
When the Inline Parameters is checked your parameters are identified as constants in the code generation. If unchecked the code generation will assign your tunable parameters as variables, therefore you will be able to tune them while executing.