Register Checks

Create sl_customization Function

To add checks to the Model Advisor, on your MATLAB® path, in the sl_customization.m file, create the sl_customization() function.


  • You can have more than one sl_customization.m file on your MATLAB path.

  • Do not place an sl_customization.m file that customizes checks and folders in the Model Advisor in your root MATLAB folder or its subfolders, except for the matlabroot/work folder. Otherwise, the Model Advisor ignores the customizations that the file specifies.

The sl_customization function accepts one argument, a customization manager object, as in this example:

function sl_customization(cm)

The customization manager object includes methods for registering custom checks. Use these methods to register customizations specific to your application, as described in the following sections.

Register Checks

To register custom checks, the customization manager includes the following method:

  • addModelAdvisorCheckFcn (@checkDefinitionFcn)

    Registers the checks that you define in checkDefinitionFcn to the By Product folder of the Model Advisor.

    The checkDefinitionFcn argument is a handle to the function that defines custom checks that you want to add to the Model Advisor as instances of the ModelAdvisor.Check class.

This example shows how to register custom checks:

function sl_customization(cm)

% register custom checks


If you add custom tasks and folders within the sl_customization.m file, include methods for registering the tasks and folders in the sl_customization function.

See Also

Related Examples

More About