Documentation Center

  • Trial Software
  • Product Updates

Contents

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);

See Also

How To

Was this topic helpful?