strhyperlink
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Text/Strs/Chars/Links
Introduced first in SolidGeometry 4.8, Creation date: 2019-11-23, Last change: 2025-09-14
returns a simple html hyperlink text for fprintf
Description
WARNING: With this feature you can cause terribly negative things like Trojans, viruses, hard disk deletions etc. by the user. Never press links without looking at the resolution in the footer.
Simple Macro fom Matlab help text
sprintf('%s',url,text);
This function is useful to create hyperlinks in text output for automatic design
for example to open also files, directories or to start programms
be aware, that the behavior of the default matlab browser is different and does not support the functionaly yet of Safari, FireFox, Opera, etc.
See Also: sprintfilehyperlink
, sprintfhyperlinktab
, evalhyperlinktab
Example Illustration
Syntax
hlstr=strhyperlink(text,url)
Input Parameter
text: | | text string |
url: | | url of link |
Output Parameter
hlstr: | | html string to use even in fprintf |
Examples
strhyperlink('test','http://www.mimed.de')
fprintf('>>>>%s<<<<\n',strhyperlink('TUM Mimed','http://www.mimed.de'))
fprintf('At %s you will find a lot of STL Files.\n',strhyperlink('Grabcad','https://grabcad.com'))
fprintf('You can read the file "%s" in the Matlab browser.\n',strhyperlink('strhyperlink.m','file:///Volumes/LUETH-WIN/WIN%20AIM%20Matlab%20Libraries/SolidGeometry-Code/strhyperlink.m'))
fprintf('You can open the file "%s" at line #2, in the matlab or execute any matlab command.\n',strhyperlink('strhyperlink.m','matlab: opentoline(''/Volumes/LUETH-WIN/WIN AIM Matlab Libraries/SolidGeometry-Code/strhyperlink.m'',2)'))
fprintf('You can execute any matlab commando from the printout such as: "%s".\n',strhyperlink('what is 1+1?','matlab: 1+1'))
fprintf('You can execute any matlab commando from the printout such as: "%s".\n',strhyperlink('Create a Cylinder?','matlab: SGofCPLcommand(''c 4, h 5'')'))
Copyright 2019-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Last html export of this page out of FM database by TL: 2025-09-21