Main Content


Class: matlab.unittest.diagnostics.ConstraintDiagnostic
Package: matlab.unittest.diagnostics

Add condition to condition list


addCondition(diag, cond)


addCondition(diag, cond) adds the condition, cond, to the condition list. Add conditions to the condition list one at a time. When the condition list is displayed, each condition is preceded by an arrow (-->) delimiter and indented.

Input Arguments


Condition, specified as a character vector or string scalar containing information specific to the cause of the constraint failure or another Diagnostic instance, which acts as a “subdiagnostic”. To set multiple conditions, specify cond as a string array or array of Diagnostic instances.


matlab.automation.diagnostics.Diagnostic instance.