Open web page or file in browser
web
opens an empty MATLAB® web browser.
web(
opens the page specified by
url
)url
in the MATLAB web browser. If url
is an external site,
web(url)
opens the page in your system browser. If
multiple browsers are open, the page displays in the one that was most recently
used.
web(
opens the page using the specified browser option, such as
url
,opt
)'-new'
to create a new browser instance or
'-browser'
to use the system browser.
On Microsoft® Windows® and Apple Macintosh platforms, the operating system determines the system web browser. On other systems, the default is the Mozilla® Firefox® browser, but you can change the default using MATLAB web preferences.
returns
the status of the operation: stat
= web(___)0
if successful,
1
or 2
if unsuccessful. You can
include any of the input arguments in previous syntaxes.
[
returns a handle to the MATLAB web browser that allows you to close it using the command
stat
,h
]
= web(___)close(h)
. If the page opens in a system browser,
web
returns an empty handle.
If you do not specify any inputs to the web
function, such
as [stat,h] = web
, then the handle corresponds to the most
recently used MATLAB web browser.
MATLAB
Online™ only supports the web(url)
syntax.
Calling web(url)
in MATLAB
Online opens the page specified by url
in your web
browser instead of the MATLAB web browser.
To open external sites in the MATLAB browser instead of your system browser by default, go to the Home tab, and in the Environment section, click Preferences. Select MATLAB > Web and in the System Web browser section, clear Use system web browser when opening links to external sites (recommended). Using the system browser is recommended when opening external sites.
If you plan to deploy an application that calls the web
function
using the MATLAB
Compiler™ product, then use the '-browser'
option.
If you are displaying Japanese streaming text in the MATLAB web
browser, specify a header that includes the charset
attribute.
For example:
web(['text://<html><head><meta http-equiv="content-type" ' ... 'content="text/html;charset=utf-8"></head><body>TEXT</body></html>'])
matlab.net.http.RequestMessage
| urlread
| urlwrite
| weboptions
| webread
| websave
| webwrite