Promoting Block Parameters to a Mask
In R2011b, we are trying to make it easier to interface the parameters of a masked subsystem with the parameters of the blocks under this mask. We call this Promoting Block Parameters. Let's see how this works.
Promoting a parameter
Let's use this simple system as an example.I want to create a mask on top of it and allow users to tune only certain values. For example, I want to give the user the ability to specify the rising slew rate of the Rate Limiter block. I open the Mask Editor, add a parameter and click the new Promote button:
This will launch the promoted parameter selector dialog box, where I can choose the block and the parameter I want to promote.
Interface for Multiple Parameters
One of my favorite thing about this feature is that you can easily map one mask parameter to multiple parameters under the mask. In older releases, a good amount of code-gymnastics might have been necessary to make that happen.
In my example system, I have 3 blocks with a checkbox to Enable zero-crossing detection. In the promoted parameter selector dialog, I can use the Search field to find all the blocks with this parameter and promote them to one parameter of my mask:
When I come back to the Mask Editor, I can easily see which parameters are promoted to this mask parameter:
The result looks like this. If I look under the the mask, the promoted block parameters are grayed and can be tuned in the top mask.
Now it's your turn
Give this a try and let us know what you think by leaving a comment here.
- カテゴリ:
- Masking,
- What's new?
コメント
コメントを残すには、ここ をクリックして MathWorks アカウントにサインインするか新しい MathWorks アカウントを作成します。