| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
urlwrite(URL, filename)
urlwrite(URL, filename, method, params)
f = urlwrite(...)
[f, status]
= urlwrite(...)
urlwrite(URL, filename) reads Web content at the specified URL and saves it to filename. If you do not specify the path for filename, urlwrite saves the file in the MATLAB current folder.
urlwrite(URL, filename, method, params) uses a method of 'get' or 'post', and passes information in params to the server. params is a cell array of parameter name/value pairs.
f = urlwrite(...) assigns filename to f.
[f, status] = urlwrite(...) returns a status of 1 when the operation is successful. Otherwise, status is 0.
Download the page on the MATLAB Central File Exchange that lists submissions related to urlwrite, found at http://www.mathworks.com/matlabcentral/fileexchange/?term=urlwrite. Save the results to samples.html in the current directory.
urlwrite(...
'http://www.mathworks.com/matlabcentral/fileexchange',...
'samples.html', ...
'get', ...
{'term','urlwrite'});View the file in the Help browser:
open('samples.html')urlread and urlwrite can download content from FTP sites. Alternatively, use the ftp function to connect to an FTP server and the mget function to download a file.
![]() | urlread | usejava | ![]() |

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 |