find
类: slreq.Justification
命名空间: slreq
查找父级申述的子级
语法
childJusts = find(jt,'PropertyName1',PropertyValue1,...,'PropertyNameN',PropertyValueN)
说明
查找并返回父申述childJusts
= find(jt
,'PropertyName1'
,PropertyValue1
,...,'PropertyNameN'
,PropertyValueN
)jt
的子申述 childJusts
,且该子申述与 PropertyName
和 PropertyValue
指定的属性相匹配。
输入参数
jt
— 申述
slreq.Justification
对象
申述,指定为 slreq.Justification
对象。
PropertyName
— 申述属性
字符向量
申述属性名称,指定为字符向量。请参阅 slreq.Justification
的 属性 部分中的有效属性名称。
示例: 'Type','Keywords','SID'
PropertyValue
— 申述属性值
字符向量 | 字符数组 | datetime
值 | 标量 | logical
| 结构体数组
申述属性值,指定为字符向量、字符数组、datetime
值、标量、logical
或结构体数组。数据类型取决于指定的 propertyName
。请参阅 slreq.Justification
的 属性 部分中的有效属性值。
输出参量
childJusts
— 子申述
slreq.Justification
对象 | slreq.Justification
对象数组
子申述,以 slreq.Justification
对象形式返回。
示例
寻找子申述
此示例显示如何查找与属性值匹配的子申述。
加载描述巡航控制系统的crs_req_justs
需求文件,并将其分配给变量。找到索引为 5
的申述,因为该申述有子申述。
rs = slreq.load('crs_req_justs'); parentReq = find(rs,'Type','Justification','Index','5');
查找在修订版 1
中修改的所有 parentReq
的子申述。
childReqs1 = find(parentReq,'FileRevision',1)
childReqs1=1×6 Justification array with properties:
Id
Summary
Description
Keywords
Rationale
CreatedOn
CreatedBy
ModifiedBy
IndexEnabled
IndexNumber
SID
FileRevision
ModifiedOn
Dirty
Comments
Index
查找在修订版 1
中修改了的 parentReq
的所有子申述,并且其摘要为 Non-functional requirement
。
childReqs2 = find(parentReq,'FileRevision',1,'Summary','Non-functional requirement')
childReqs2 = Justification with properties: Id: '#72' Summary: 'Non-functional requirement' Description: '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">...' Keywords: {} Rationale: '' CreatedOn: 27-Feb-2017 10:34:22 CreatedBy: 'itoy' ModifiedBy: 'asriram' IndexEnabled: 1 IndexNumber: [] SID: 72 FileRevision: 1 ModifiedOn: 03-Aug-2017 17:14:44 Dirty: 0 Comments: [0x0 struct] Index: '5.1'
清理
清除打开的需求集和链接集,并关闭打开的模型而不保存更改。
slreq.clear;
bdclose all;
版本历史记录
在 R2018b 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)