move
类: slreq.Justification
命名空间: slreq
语法
tf = move(jt1,location,jt2)
输入参数
jt1
— 要移动的申述
slreq.Justification
对象
移动的申述,指定为 slreq.Justification
对象。
location
— 申述移动位置
'under'
| 'before'
| 'after'
调整移动位置,指定为 'under'
、'before'
或 'after'
。
jt2
— 申述
slreq.Justification
对象
申述,指定为 slreq.Justification
对象。
输出参量
tf
— 粘贴成功状态
0
| 1
粘贴成功状态,以数据类型为 logical
的 0
或 1
返回。
示例
移动申述
此示例显示如何将一个申述移到另一个申述之下、之前或之后。
加载描述巡航控制系统的crs_req_justs
需求文件,并将其分配给变量。根据索引找出两个申述。第一个申述将相对于第二个申述而移动。
rs = slreq.load('crs_req_justs'); jt1 = find(rs,'Type','Justification','Index','5.1'); jt2 = find(rs,'Type','Justification','Index','5.2');
根据申述移动
将第一个申述jt1
移至第二个申述jt2
下方。第一个申述成为申述jt2
的最后一个子申述,并且 jt2
在层次结构中向上移动一位,您可以通过检查 jt1
和 jt2
的索引来验证这一点。jt1
和 jt2
的旧索引分别为 5.1
和 5.2
。
tf = move(jt1,'under',jt2);
jt1.Index
ans = '5.1.3'
jt2.Index
ans = '5.1'
在申述之前移动
将第一个申述jt1
移到第二个申述jt2
之前。通过检查 jt1
和 jt2
的索引来确认申述是否正确移动。jt1
和 jt2
的索引现在与原来相同:分别为 5.1
和 5.2
。
tf = move(jt1,'before',jt2);
jt1.Index
ans = '5.1'
jt2.Index
ans = '5.2'
申述之后移动
将第一个申述jt1
移至第二个申述jt2
之后。当您在层次结构中将申述jt1
向下移动时,申述jt2
也会向上移动,您可以通过检查 jt1
和 jt2
的索引来验证这一点。
tf = move(jt1,'after',jt2);
jt1.Index
ans = '5.2'
jt2.Index
ans = '5.1'
清理
清除打开的需求集和链接集,并关闭打开的模型而不保存更改。
slreq.clear;
bdclose all;
版本历史记录
在 R2020b 中推出
另请参阅
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)