Products & Services Solutions Academia Support User Community Company

Learn more about Simulink Verification and Validation   

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.

Example

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

Defining Check Actions — Describes how to create custom actions
Customizing the Model Advisor — Describes how to create custom checks
setActionenable — Set enable/disable status for check action
  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS