23.06.2015 Views

MATLAB Programming

MATLAB Programming

MATLAB Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

6 Data Import and Export<br />

ndata = xlsread('tempdata.xls', 'Temperatures')<br />

ndata =<br />

12 98<br />

13 99<br />

14 97<br />

To import both numeric data and text data, specify two return values for<br />

xlsread:<br />

[ndata, headertext] = xlsread('tempdata.xls', 'Temperatures')<br />

headertext =<br />

'Time'<br />

'Temp'<br />

ndata =<br />

12 98<br />

13 99<br />

14 97<br />

Lotus 123 Spreadsheets<br />

This section covers<br />

• “Getting Information About the File” on page 6-100<br />

• “Exporting to the File” on page 6-101<br />

• “Importing from the File” on page 6-102<br />

See the wk1finfo, wk1write, andwk1read reference pages for more detailed<br />

information and examples.<br />

Getting Information About the File<br />

Use the wk1finfo function to determine if a file contains a Lotus WK1<br />

spreadsheet:<br />

Inputs to wk1finfo are<br />

• Name of the spreadsheet file<br />

Outputs from wk1finfo are<br />

6-100

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

Saved successfully!

Ooh no, something went wrong!