Development Environment |
Overview
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 two factors:
Note The easiest way to import data into MATLAB is to use the Import Wizard. When you use the Import Wizard, you do not need to know the format of the data. You simply specify the file that contains the data and the Import Wizard processes the file contents automatically. For more information, see Using the Import Wizard with Text Data and Using the Import Wizard with Binary Data Files. You can also use the Import Wizard to import HDF data. See Using the HDF Import Tool for more information. |
Text Data
In text format, 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 information. 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). For more information about working with HDF data, see
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.
Importing and Exporting Data | Importing Text Data |