Is there a way to replace variables used in a Simulink block with actual values stored in the Matlab base workspace (or model workspace) ?
e.g. In a gain block, the 'Gain' parameter is set to 'gain_A'. 'gain_A' is defined in the base workspace to '0.5'. Intended script will replace 'gain_A' in the gain block with'0.5'.
A method that I've tried is to use Simulink.findVars(modelname, 'Name', 'gain_A')
which will return an object that contains a property with all the blocks that uses the variable 'gain_A'. However, it doesn't tell me which parameter it is used for (e.g. 'Gain').
Appreciate your help =)