Main Content

本页采用了机器翻译。点击此处可查看英文原文。

setAttribute

类: slreq.Justification
命名空间: slreq

设置申述属性

语法

setAttribute(jt, propertyName, propertyValue)

说明

setAttribute(jt, propertyName, propertyValue) 设置了申述属性。

输入参数

全部展开

申述,指定为 slreq.Justification 对象。

申述属性名称。

示例: 'SID', 'CreatedOn', 'Summary'

申述属性值。

示例: 'Test Justification', 'J4.5.4'

示例

设置申述属性

% Load a requirement set file and get the handle to one justification 
rs = slreq.load('C:\MATLAB\My_Requirements_Set_1.slreqx');
jt1 = find(rs, 'Type', 'Justification', 'ID', 'J2.1');

% Set the Summary of req1
setAttribute(jt1, 'Summary', 'Controller Requirement Justification');

jt1

jt1 = 

  Justification with properties:

              Id: 'J2.1'
         Summary: 'Controller Requirement Justification'
     Description: ''
        Keywords: [0×0 char]
       Rationale: ''
       CreatedOn: 27-Feb-2014 10:15:38
       CreatedBy: 'Jane Doe'       
      ModifiedBy: 'John Doe'
             SID: 37
    FileRevision: 25
      ModifiedOn: 02-Aug-2017 13:49:40
           Dirty: 1
        Comments: [0×0 struct]

版本历史记录

在 R2018b 中推出

另请参阅