Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

setCallbackFcn

Class: ModelAdvisor.Action
Package: ModelAdvisor

Specify action callback function

Syntax

setCallbackFcn(action_obj, @handle)

Description

setCallbackFcn(action_obj, @handle) specifies the handle to the callback function, handle, to use with the action object, action_obj.

Examples

    Note:   The following example is a fragment of code from the sl_customization.m file for the example model, slvnvdemo_mdladv. The example does not execute as shown without the additional content found in the sl_customization.m file.

rec = ModelAdvisor.Check('mathworks.example.optimizationSettings');
% Define an automatic fix action for this check
modifyAction = ModelAdvisor.Action;
modifyAction.setCallbackFcn(@modifyOptmizationSetting);
modifyAction.Name = 'Modify Settings';
modifyAction.Description = ['Modify model configuration optimization' ...
                            ' settings that can impact safety'];
modifyAction.Enable = true;
rec.setAction(modifyAction);
Was this topic helpful?