Development Environment    

Exchanging Files with the Internet

MATLAB provides a set of functions for exchanging files with the Internet. These include

Downloading URL Content

From within MATLAB, you can read and save the content of a URL. The urlread function reads the content to a string variable in the MATLAB workspace. The urlwrite function saves the content to a file.

Example--Retrieving Content from a URL

This example downloads the contents of the Top Authors list at MATLAB Central File Exchange, assigning the results to the string s in the MATLAB workspace.

  1. Retrieve the URL content.
  2. After retrieving the content, perform MATLAB functions on the variable s, such as

The next example downloads the files submitted for Signal Processing, Communications, and DSP from MATLAB Central File Exchange, saving the results to samples.html in the MATLAB current directory.

After downloading, you can view the file in your Web browser.


  Closing a File ZIP Functions