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
folder. Otherwise, the Model Advisor ignores the customizations that
the file specifies.matlabroot
/work
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.
To register custom checks, the customization manager includes the following method:
addModelAdvisorCheckFcn
(@
checkDefinitionFcn
)
Registers the checks that you define in
to the By Product folder of the Model Advisor. checkDefinitionFcn
The
argument is a handle to the function that defines custom checks that you
want to add to the Model Advisor as instances of the
checkDefinitionFcn
ModelAdvisor.Check
class.
This example shows how to register custom checks:
function sl_customization(cm) % register custom checks cm.addModelAdvisorCheckFcn(@defineModelAdvisorChecks);
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.