MATLAB 帮助中心
本页采用了机器翻译。点击此处可查看最新英文版本。
类: slreq.Requirement 命名空间: slreq
以纯文本形式获取需求原理
自 R2023a 起
description = getRationaleAsText(req)
description = getRationaleAsText(req) 以纯文本形式返回需求的理由 req。
description
req
示例
全部展开
slreq.Requirement
需求,指定为 slreq.Requirement 对象。
rationale
需求理由,以字符向量形式返回。
假设您在当前文件夹 myReqs.slreqx 中需求集,并且您想要检索该需求的理由。使用 slreq.load 函数加载需求集。
myReqs.slreqx
slreq.load
reqset = slreq.load("myReqs.slreqx");
使用 find 方法检索需求。
find
reqs = reqset.find("Type","Requirement");
创建一个 for 循环,检索 slreq.Requirement 对象数组中每个需求的理由。
for
reqRationales = cell(length(reqs),1); for k = 1:length(reqs) reqRationales{k} = reqs(k).getRationaleAsText; end reqRationales{1}
ans = 'The is the requirement rationale'
在 R2023a 中推出
slreq.Requirement | find | getDescriptionAsText | slreq.load
getDescriptionAsText
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处