Development Environment    

Importing and Exporting Data


MATLAB provides many ways to load data from disk files or the clipboard into the workspace, a process called importing data, and to save workspace variables to a disk file, a process called exporting data. Your choice of which mechanism to use depends on which operation you are performing, importing or exporting, and the format of the data, text or binary.

Text Data

In text formats, the data values are American Standard Code for Information Interchange (ASCII) codes that represent alphabetic and numeric characters. ASCII text data can be viewed in a text editor. For more information about working with text data, see:

Binary Data

In binary format, the values are not ASCII codes and cannot be viewed in a text editor. Binary files contain data that represents images, sounds, and other formats. For more information about working with binary data, see:

Other Formats

MATLAB also supports the importing of scientific data that uses the Hierarchical Data Format (HDF). See Working with HDF Data for more information.

Low-Level File I/O

MATLAB also supports C-style, low-level I/O functions that you can use with any data format. For more information, see Using Low-Level File I/O Functions.


 Preferences for the Current Directory Browser Importing Text Data