Main Content

setCheck

R2026b

Specify check used in Model Advisor task

Description

setCheck(taskObj,checkID) specifies the handle to the callback function, handle, to use with the action object, action_obj.

example

Examples

collapse all

This example shows how to add a custom check to a task.

Create a unique task ID and assign it to a task object.

taskID = "com.mathworks.sample.Task1";
taskObj = ModelAdvisor.Task(taskID);

Set the task properties.

taskObj.DisplayName = "Sample Task";
taskObj.Description = "This task runs a custom check as part of the Model Advisor analysis.";
taskObj.Enable = true;

Add a check to the task.

checkID = "com.mathworks.sample.Check1";
setCheck(taskObj,checkID);

Input Arguments

collapse all

Wrapper for a custom check to display in the Model Advisor tree, returned as a ModelAdvisor.Task object.

Unique identifier for the check to be used in the task.

Example: "com.mathworks.sample.TaskSample1"

Version History

Introduced in R2006b