MATLAB 帮助中心
本页采用了机器翻译。点击此处可查看最新英文版本。
获取行范围的链接
自 R2022b 起
myLinks = getLinks(lr)
myLinks = getLinks(lr) 返回与行范围 lr 相关的链接。
myLinks
lr
示例
全部折叠
此示例显示如何删除 slreq.TextRange 对象。
slreq.TextRange
加载与 myAdd 代码文件相关的链接数据并加载 myAddRequirements 需求集。
myAdd
myAddRequirements
file = "myAdd.m"; slreq.load(file); rs = slreq.load("myAddRequirements");
获取与 slreq.TextRange 函数中第 1 行关联的 myAdd 对象。
cr = slreq.getTextRange(file,1);
获取与 slreq.TextRange 对象关联的链接。
links = getLinks(cr)
links=1×3 Link array with properties: Type Description Keywords Rationale CreatedOn CreatedBy ModifiedOn ModifiedBy Revision SID Comments
删除与 slreq.TextRange 对象关联的链接。
count = deleteLinks(cr)
count = 3
删除与行号 1 关联的 slreq.TextRange 对象。
remove(cr)
行范围,指定为 slreq.TextRange 对象。
slreq.Link
链接,以 slreq.Link 数组返回。
在 R2022b 中推出
slreq.TextRange | slreq.getTextRange | slreq.Link | deleteLinks
slreq.getTextRange
deleteLinks
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处