Main Content

本页面提供的是上一版软件的文档。当前版本中已删除对应的英文页面。

addCondition

类: matlab.unittest.diagnostics.ConstraintDiagnostic
命名空间: matlab.unittest.diagnostics

向条件列表中添加条件

语法

addCondition(diag, cond)

说明

addCondition(diag, cond) 将条件 cond 添加到条件列表。一次只能向条件列表中添加一个条件。条件列表显示时,每个条件以箭头 (-->) 分隔符开头,并缩进显示。

输入参数

cond

条件,指定为字符向量或字符串标量,其中包含有关约束失败原因的信息,或有关另一个作为“子诊断”的 Diagnostic 实例的信息。要设置多个条件,请将 cond 指定为字符串数组或 Diagnostic 实例数组。

diag

matlab.automation.diagnostics.Diagnostic 实例。

另请参阅