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.

6 Data Import and Export<br />

character. The individual data items can be alphabetic or numeric characters<br />

or a mix of both.<br />

The text file can also contain one or more lines of text, called header lines, or<br />

can use text headers to label each column or row. The following example<br />

illustrates a tab-delimited text file with header text and row and column<br />

headers.<br />

To find out how your data is formatted, view it in a text editor. After you<br />

determine the format, find the sample in the table below that most closely<br />

resembles the format of your data. Then read the topic referred to in the table<br />

for information on how to import that format.<br />

Table6-1<br />

ASCIIDataFileFormats<br />

Data Format Sample<br />

1 2 3 4 5<br />

6 7 8 9 10<br />

1; 2; 3; 4; 5<br />

6; 7; 8; 9; 10<br />

or<br />

1, 2, 3, 4, 5<br />

6, 7, 8, 9, 10<br />

File<br />

Extension<br />

.txt<br />

.dat<br />

or other<br />

.txt<br />

.dat<br />

.csv<br />

or other<br />

Description<br />

See “Importing Numeric Text<br />

Data” on page 6-78 or “Using<br />

the Import Wizard” on page<br />

6-9 for information.<br />

See “Importing Delimited<br />

ASCII Data Files” on page<br />

6-79 or “Using the Import<br />

Wizard” on page 6-9 for<br />

information.<br />

6-76

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

Saved successfully!

Ooh no, something went wrong!