getSourceOpenCommand
类: slreq.Link
命名空间: slreq
输入参数
myLink
— 链接
slreq.Link
对象
链接,指定为 slreq.Link
对象。
输出参量
command
— 打开链接源的命令
字符向量
打开链接源的命令,以字符向量形式返回。在 MATLAB 中输入命令将打开源文件和位置,例如 MATLAB 程序文件或 Simulink®模型工件中的代码。
示例
返回打开链接源的命令
假设您在当前文件夹 signals~m.slmx
中设置了一个链接,并且您想要检索打开每个链接的链接源的命令。
使用slreq.load
函数加载链接集。
linkSet = slreq.load("signals~m.slmx");
使用 getLinks
函数将链接作为 slreq.Link
对象数组检索。
links = linkSet.getLinks;
创建一个for
循环,检索打开slreq.Link
对象数组中每个链接的链接源的命令。
linkSourceCommands = cell(length(links),1); for k = 1:length(links) linkSourceCommands{k} = links(k).getSourceOpenCommand; end
在MATLAB中输入linkSourceCommands
中某个元素的文本,即可打开相应的链接目的地。
版本历史记录
在 R2023a 中推出
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)