MATLAB: Is there ‘find and replace’ functionality for Simulink block parameters

andblockfindget_parammodelparametersreplaceset_paramsimulink

I have a model with many blocks which use the same variable as the values for block parameters.  Now I would like to change the variable name, but do not want to manually update each block parameter.  Is there any way to find and replace all of these block parameters with the updated variable name?

Best Answer

Use 'find_system' and get_param/set_param.  This is implemented in the attached script, 'CommandLine_Find_And_Replace.m'