| MATLAB Function Reference |    | 
Open Web site or file in Web browser or Help browser
Syntax
web weburlweb url -newweb url -notoolbarweb url -noaddressboxweb url -helpbrowserweb url -browserweb(...) stat = web('url', '-browser') [stat, h1] = web [stat, h1, url] = web web url -browser
Description
web
 opens an empty MATLAB Web browser. The MATLAB Web browser includes an address field where you can enter a URL (Uniform Resource Locator), for example to a Web site or file, a toolbar with common browser buttons, and a MATLAB desktop menu.
web  displays the specified URL url
url in the MATLAB Web browser. If any MATLAB Web browsers are already open, displays the page in the browser that last had focus. Files up to 1.5MB in size display in the MATLAB Web browser, while larger files instead display in the default Web browser for your system. If url is located in the directory returned when you run docroot, the URL displays in the MATLAB Help browser instead of the MATLAB Web browser.
web  displays the specified URL url -new
url in a new MATLAB Web browser.
web  displays the specified URL url -notoolbar
url in 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 last had focus, regardless of its toolbar status.
web  displays the specified URL url -noaddressbox
url in 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 last had focus, regardless of its address field status.
web  displays the specified URL url -helpbrowser
url in the MATLAB Help browser.
web url - displays the default Web browser for your system and loads the file or Web site specified by the URL browser
url in it. Generally, url specifies a local file or a Web site on the Internet. The URL can be in any form that the browser supports. On Windows and Macintosh, the default Web browser is determined by the operating system. On UNIX, the Web browser used is specified via docopt in the doccmd string.
web(...)
 is the functional form of web.
stat = web('url', ' runs -browser')
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 Java class, for the last active browser.
[stat, h1, url] = web
 returns the status of web to the variable stat, returns a handle to the Java class for the last active browser, and returns its current URL to url.
Examples
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(['file:///' which('foo.html')])opens foo.html if the file is on the MATLAB path or in the current directory.
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 a browser to mathtools.net. Then [stat,h1,url]=web returns
stat = 0 h1 = com.mathworks.mde.webbrowser.WebBrowser[,0,0,591x140, layout=java.awt.BorderLayout,alignmentX=null,alignmentY=null, border=,flags=9,maximumSize=,minimumSize=,preferredSize=] url = http://www.mathtools.net/
Run methods(h1) to view allowable methods for the class. As an example, you can use the method setCurrentLocation to change the URL displayed in h1, as in
See Also
doc, docopt, helpbrowser, matlab:
|   | wavwrite | weekday |  | 
© 1994-2005 The MathWorks, Inc.