Hello,
I have a block where I want the unit of the output port to be the same as the Simulink.Parameter (inside a Data Dictionary) that I enter into the mask.
I set the output port unit in the initialization code with:
set_param([gcb '/Out1'], 'Unit', get_param(gcb, 'INPUTPARAM.Unit'));
here INPUTPARAM is the name I assign to the given Parameter in the Mask Dialog and I want to access the Field Unit. Sadly this doesn't work because INPUTPARAM is not the given Parameter but the Value.
So is there a way to access the Unit of the given Simulink.Parameter inside a Data Dictionary in the Mask Workspace?
Best Answer