If you look at this exchange I had with Xiaojun Yang, you will see that it ends up with the common question:
Which callback function is appropriate choice if it’s such a case?
Which callback should I use?
I have to admit, in Simulink there are many callbacks available and it is not always obvious which one should be used for a specific task.
For masked subsystems, you typically have two types of callbacks. For each parameter, you have a dialog callback:
and you have initialization commands:
Even though they can sometime be interchanged, those two types of callback are intended for different use cases and using the wrong one can lead to unexpected behavior.
Best Practices for Masking
In R2012b, if you search the documentation for "masking examples", you will notice that the first result is:
In the Best Practices for Masking page, there are detailed examples showing how to achieve common masking tasks:
In your MATLAB installation, each of these links open a model with annotations and detailed comments in each callback to give you the starting point to develop your own masks.
Now it's your turn
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.