MATLAB 帮助中心
本页采用了机器翻译。点击此处可查看英文原文。
类: slreq.Requirement 命名空间: slreq
检查该需求是否是 Requirements Table 模块中的一行
自 R2026a 起
tf = isRequirementRow(req)
tf = isRequirementRow(req) 用于检查 req 指定的需求是否是 Requirements Table 模块中的需求行。
tf
req
示例
全部展开
本示例演示了如何检查一个需求是否是 Requirements Table 模块中的需求行,并获取相应的 RequirementRow 对象。
RequirementRow
加载模型以加载需求集。
load_system("duration_column_example_model.slx");
查找已加载的需求。
reqs = slreq.find("Type","Requirement")
reqs=1×3 Requirement array with properties: Type Id Summary Description Keywords Rationale CreatedOn CreatedBy ModifiedBy IndexEnabled IndexNumber SID FileRevision ModifiedOn Dirty Comments Index
检查第一个需求是否是 Requirements Table 模块中的需求行。
isRequirementRow(reqs(1))
ans = logical 1
获取与第一个需求相对应的需求行。
requirementRow(reqs(1))
ans = RequirementRow with properties: Actions: {'y = 1'} Duration: '2' ChildEvaluation: 'independent' RowType: 'normal' Index: '1' Preconditions: {'u >= 0'} Postconditions: {''} Summary: 'Requirement 1'
slreq.Requirement
需求,指定为 slreq.Requirement 对象。
1
true
0
false
结果为真或假,以数据类型 logical 的 1 或 0 形式返回。
logical
在 R2026a 中推出
RequirementsTable
requirementRow
slreq.modeling.create
slreq.modeling.find
requirement
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处