I am trying to update 20 variables in a Simulink model by using set_param in an m script file. Is there any way to do this using a "for i=1:20" subroutine referencing Constant1, Constant2, Constant3, etc, as Constant(i) and with data from Q(i), so I do not have to write 20 separate entries in the set_param command?
MATLAB: Using set_param for multiple variables.
multiple setsparametersset_paramsimulink
Related Question
- How to change Simulink constant block value to a constant variable
- Can I set the data parameter of a Fromworkspace block by programming ??
- How to acces blocks using iteration variable
- Use a button to increase a value in simulink each time it is pressed
- Error in Using set_param
- Do I get the error “Invalid setting in ‘
/ ‘ for parameter ‘‘.” when calling set_param
Best Answer