User`s guide

25 Create Model Advisor Checks
25-52
Model Advisor Code Examples
In this section...
“Register Custom Checks and Process Callbacks” on page 25-52
“Process Callback Function” on page 25-52
“Input Parameter Definition” on page 25-53
“List View Definition” on page 25-54
“Action Definition” on page 25-55
“Informational Check Callback Function” on page 25-56
“Basic Check with Pass/Fail Status” on page 25-58
“Check With Subchecks and Actions” on page 25-60
“Action Callback Function” on page 25-62
Register Custom Checks and Process Callbacks
The following code example registers custom checks and a process callback function:
function sl_customization(cm)
% register custom checks
cm.addModelAdvisorCheckFcn(@defineModelAdvisorChecks);
% register custom process callback
cm.addModelAdvisorProcessFcn(@ModelAdvisorProcessFunction);
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. For
more information, see “Register Tasks and Folders” on page 26-14.
Process Callback Function
The following code is an example of a process callback function that specifies actions in
the configure stage, to make only custom checks visible. In the process_results
stage, this function displays information at the command prompt for checks that do not
pass.
% Process Callback Function