Link

版本 1.1.0.2 (1.9 KB) 作者: Sky Sartorius
Similar to a character string, but displays itself in the command window as a clickable link.
337.0 次下载
更新时间 2020/6/26

查看许可证

Link(target) creates a Link object pointing to location or code defined by target, e.g., a URL.
Link(target, text) will display text instead of the target.
To add a hyperlink to a longer string, e.g., using sprintf, use the Link object's str property.

Examples included in help:

Example
Link('matlab:docsearch hyperlinks', 'Learn more about MATLAB hyperlinks')

Example
lnk = Link('matlab:ezplot(@cos)', 'Display cosine function')

Example
lnk = Link('http://mathworks.com/matlabcentral/', 'MATLAB Central');
disp('The link can be shown by normal display:')
lnk
disp('Or by using the function disp:')
disp(lnk);
disp('Alternatively, access the object''s str property:')
fprintf('Go to %s for lots of great resources.\n', lnk.str);

引用格式

Sky Sartorius (2024). Link (https://www.mathworks.com/matlabcentral/fileexchange/48638-link), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2018b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.1.0.2

Added an example to get to hyperlinks documentation.

1.1.0.1

Changed property validation to new syntax.

1.1.0.0

Added input checking and enforcement.

1.0.0.0