How can I evaluate an Simulink.data.Expression in a MATLAB script
4 views (last 30 days)
In my data dictionary, I have a Simulink.Parameter whose value is set as an expression:
Parameter with properties:
CoderInfo: [1×1 Simulink.CoderInfo]
Dimensions: [1 1]
Now I would like to get the numeric value of the parameter within a script. So how can I evaluate the expression
Any hint would be greatly appreciated. Thank you very much.
Jeffrey Clark on 15 Sep 2022
@Karsten Gordon, Evaluate MATLAB expression in data dictionary section - MATLAB evalin (mathworks.com) or Evaluate MATLAB expression - MATLAB eval (mathworks.com). I don't have Simulink to try; to use the eval function you would have to use just what is in the quotes:"single(420*pi/180)"