| MATLAB® | ![]() |
web
web url
web url -new
web url -notoolbar
web url -noaddressbox
web url -helpbrowser
web url -browser
web(...)
stat = web('url', '-browser')
[stat, h1] = web
[stat, h1, url] = web
web opens an empty MATLAB Web browser. The MATLAB Web browser includes an address field where you can enter a URL to a Web site or a file, a toolbar with common browser buttons, and a MATLAB desktop menu.
web url displays the page specified by url in the MATLAB Web browser. If any MATLAB Web browsers are already open, it displays the page in the browser that was used last. Files up to 1.5 MB in size display in the MATLAB Web browser, while larger files instead display in your system Web browser. The web function accepts a valid URL such as a web site address, a full path to a file, or a relative path to a file (using url within the current directory if it exists there). If url is located in the directory returned when you run docroot (an unsupported utility), the page displays in the MATLAB Help browser instead of the MATLAB Web browser.
web url -new displays the page specified by urlin a new MATLAB Web browser.
web url -notoolbar displays the page specified by urlin a MATLAB Web browser that does not include the toolbar and address field. If any MATLAB Web browsers are already open, also use the -new option; otherwise url displays in the browser that was used last, regardless of its toolbar status.
web url -noaddressbox displays the page specified by urlin a MATLAB Web browser that does not include the address field. If any MATLAB Web browsers are already open, also use the -new option; otherwise url displays in the browser that was used last, regardless of its address field status.
web url -helpbrowser displays the page specified by urlin the MATLAB Help browser.
web url -browser displays your system Web browser and loads the file or Web site specified by url in it. url can be in any form that the browser supports. On Microsoft Windows and Apple Macintosh platforms, the system Web browser is determined by the operating system. On UNIX[1] platforms, the default system Web browser for MATLAB is Mozilla Firefox®; you can specify a different browser using MATLAB Web preferences.
web(...) is the functional form of web.
stat = web('url', '-browser') runs web and returns the status of web to the variable stat.
Value of stat | Description |
|---|---|
0 | Browser was found and launched. |
1 | Browser was not found. |
2 | Browser was found but could not be launched. |
[stat, h1] = web returns the status of web to the variable stat, and returns a handle to the Sun Microsystems Java class, h1, for the last active browser. You can use close(h1) to clear the displayed page from the browser. The browser, h1, could have been opened when the web function was previously executed, or when a tool ran the web function. For example, clicking a link to an external site from the Help browser runs web to open the Web site in a system browser, and h1 would be the handle for that browser instance.
[stat, h1, url] = web returns the status of web to the variable stat, returns a handle to the Java class h1 for the last active browser, and returns its current URL to url.
Run
web http://www.mathtools.net
and MATLAB displays

web http://www.mathworks.com loads the MathWorks Web site home page into the MATLAB Web browser.
web file:///disk/dir1/dir2/foo.html opens the file foo.html in the MATLAB Web browser.
web mydir/myfile.html opens myfile.html in the MATLAB Web browser, where mydir is in the current directory.
web(['file:///' which('foo.html')])opens foo.html if the file is on the search path or in the current directory for MATLAB.
web('text://<html><h1>Hello World</h1></html>') displays the HTML-formatted text Hello World.
web('http://www.mathworks.com', '-new', '-notoolbar') loads the MathWorks Web site home page into a new MATLAB Web browser that does not include a toolbar or address field.
web file:///disk/dir1/foo.html -helpbrowser opens the file foo.html in the MATLAB Help browser.
web file:///disk/dir1/foo.html -browser opens the file foo.html in the system Web browser.
web mailto:email_address uses your system browser's default e-mail application to send a message to email_address.
web http://www.mathtools.net -browser opens the system Web browser at mathtools.net.
[stat,h1]=web('http://www.mathworks.com'); opens mathworks.com in a browser. Then, close(h1) clears the displayed URL, mathworks.com, from the browser window.
Displaying Documents and Web Sites in Web Browsers in the MATLAB Desktop Tools and Development Environment documentation
[1] UNIX is a registered trademark of The Open Group in the United States and other countries.
![]() | wavwrite | weekday | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |