This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

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.

Tip

  • 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
cm.addModelAdvisorCheckFcn(@defineModelAdvisorChecks);

Note

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