MATLAB R2022b was launched a couple of weeks in the past, so it is time to spotlight a couple of new Simulink options. On this publish, I made a decision to give attention to one characteristic which may move a bit of bit underneath the radar, however that I consider can prevent a whole lot of time.
In case you have not seen, in R2022b we now show the evaluated worth of parameters in block dialogs:
The identical additionally occurs within the Property Inspector:
Here’s a fast video illustrating that this characteristic instantly shows any expression you kind within the block dialog, evaluated within the context of the place the block is situated:
A Extra Advanced Instance
Clearly, for easy fashions, determining the worth of a parameter is comparatively straightforward. You possibly can merely kind it within the base workspace or look inside a knowledge dictionary. Let’s look right into a extra complicated setup the place the utility of this characteristic turns into extra apparent.
For those who take a look at the dialog of one of many Fixed blocks in Cylinder 2, you’ll be able to instantly see that the expression Ac^2/Ok resolves to 5e-11:
For those who do the identical inside Cylinder 3, the identical expression resolves to a unique worth, 8e-11:
The reason being that these masked subsystems obtain completely different parameters values. With out this characteristic, you would wish to undergo a sequence of steps to determine these values with out simulating the mannequin:
- Take a look at the Masks Editor to see which dialog parameter corresponds to Ac and Ok.
- Look within the dialog of every masked Subsystem to see which parameter is handed to the masks dialog of every block
- Look within the mannequin workspace to seek out the precise worth of these parameters
- Consider the equation within the MATLAB base workspace to see the ultimate values
That is a whole lot of clicks! Think about now you probably have a number of ranges of nested masked Subsystems how this complexity grows.
Customized MATLAB Objects
If the MATLAB class is well-commented, accessing all this data with one click on may be very helpful.
Disabling it
If you find yourself disabling this characteristic, I might be very to listen to the explanation.
Now it is your flip
Tell us within the feedback under what you consider this characteristic. I personally discover that it’s already saving me many clicks on daily basis.