| Simulink® Verification and Validation™ | ![]() |
To customize the Model Advisor, create an M-file called sl_customization.m and include this file on your MATLAB® path.
Note Do not place an sl_customization.m file that customizes the Model Advisor in your root MATLAB directory or any of its subdirectories, with the exception of the matlabroot/work directory. Otherwise, the Model Advisor ignores the customizations that the file specifies. |
The M-file should contain a set of functions for registering and defining custom checks, tasks, and groups. Follow these guidelines:
| Function | Description | When Required |
|---|---|---|
| sl_customization() | Registers custom checks and tasks with the Simulink® customization manager at startup (see Registering Custom Checks, Tasks, and Groups). | Required for all customizations to the Model Advisor. |
| One or more check definition functions | Defines all custom checks (see Defining Custom Checks). | Required for custom checks and to add custom checks to the By Product folder. |
| One or more task definition functions | Defines all custom tasks (see Defining Custom Tasks). | Required to add custom checks to the Model Advisor tree, except when adding the checks to the By Product folder. You must write one task for each custom check. |
| One or more group definitions | Defines all custom groups (see Defining Custom Groups). | Required to add custom tasks to new folders in the Model Advisor tree, except when adding a new subfolder to the By Product folder. You must write one group definition for each new folder. |
| Check callback functions | Defines the actions of the custom checks (see Creating Callback Functions for Checks). | Required for custom checks. You must write one callback function for each custom check. |
| One process callback function | Specifies actions to be performed at different stages of execution (see Defining a Process Callback Function). | Optional. |
| One or more calls to check input parameters | Specifies input parameters to custom checks (see Defining Check Input Parameters). | Optional. |
| One or more calls to check list views | Specifies calls to the Model Advisor Result Explorer for custom checks (see Defining Check List Views). | Optional. |
| One or more calls to check actions | Specifies actions to take for custom checks (see Defining Check Actions). | Optional. |
The following is an example of a the Model Advisor that has custom checks defined in a custom groups. The selected check includes input parameters, list view parameters, and actions.

![]() | Customizing the Model Advisor | Demo and Code Example | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |