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
Note
The following example is a fragment of code from the sl_customization.m file
for the demo 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
 | setBold (ModelAdvisor.Text) | | setCallbackFcn (ModelAdvisor.Check) |  |
Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
Get this Simulink Kit