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.

Working with Spreadsheets<br />

• String 'WK1' if the file is a Lotus spreadsheet readable with the wk1read<br />

function. Otherwise, it contains an empty string ('').<br />

• String 'Lotus 123 Spreadsheet'<br />

Example — Querying a WK1 File. This example returns information<br />

about spreadsheet file matA.wk1:<br />

[extens, type] = wk1finfo('matA.wk1')<br />

extens =<br />

WK1<br />

type =<br />

Lotus 123 Spreadsheet<br />

Exporting to the File<br />

Use the wk1write function to export a matrix to a Lotus spreadsheet file. You<br />

have the choice of positioning the matrix starting at the first row and column<br />

of the spreadsheet, or at any other location in the file.<br />

To export to a specific location in the file, use the second syntax, indicating a<br />

zero-based starting row and column.<br />

Inputs to wk1write are<br />

• Name of the spreadsheet file<br />

• Matrix to be exported<br />

• Locationinthefileinwhichtowritethedata<br />

Example — Writing to a WK1 File. This example exports an 8-by-8 matrix<br />

to spreadsheet file matA.wk1:<br />

A = [1:8; 11:18; 21:28; 31:38; 41:48; 51:58; 61:68; 71:78];<br />

A =<br />

1 2 3 4 5 6 7 8<br />

11 12 13 14 15 16 17 18<br />

21 22 23 24 25 26 27 28<br />

31 32 33 34 35 36 37 38<br />

6-101

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

Saved successfully!

Ooh no, something went wrong!