23.06.2015 Views

MATLAB Programming

MATLAB Programming

MATLAB Programming

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Input/Output<br />

Input/Output<br />

This section covers the following topics:<br />

• “File I/O Function Overview” on page 12-49<br />

• “Common I/O Functions” on page 12-49<br />

• “Readable File Formats” on page 12-50<br />

• “Using the Import Wizard” on page 12-50<br />

• “Loading Mixed Format Data” on page 12-50<br />

• “Reading Files with Different Formats” on page 12-51<br />

• “Reading ASCII Data into a Cell Array” on page 12-51<br />

• “Interactive Input into Your Program” on page 12-51<br />

For more information and examples on importing and exporting data, see<br />

Technical Note 1602:<br />

http://www.mathworks.com/support/tech-notes/1600/1602.html<br />

File I/O Function Overview<br />

For a good overview of <strong>MATLAB</strong> file I/O functions, use the online “Functions<br />

— Categorical List” reference. In the Help browser Contents, select<br />

<strong>MATLAB</strong> > Functions — Categorical List, andthenclickFile I/O.<br />

Common I/O Functions<br />

The most commonly used, high-level, file I/O functions in <strong>MATLAB</strong> are save<br />

and load. For help on these, type doc save or doc load.<br />

Functions for I/O to text files with delimited values are textread, dlmread,<br />

dlmwrite. Functions for I/O to text files with comma-separated values are<br />

csvread, csvwrite.<br />

For more information: See Text Files in the <strong>MATLAB</strong> “Functions —<br />

Categorical List” reference documentation.<br />

12-49

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!