| MATLAB Central > MATLAB Newsreader > Writing formatted text files when column number... |
|
|
|
Subject: Writing formatted text files when column number of the ouput is uncertain? From: Stephen Date: 31 Jul, 2007 13:34:16 Message: 1 of 11 |
|
I want to export some outputs by writing a formatted text file. For example, if there are three columns in my output, I will code as follows. |
|
Subject: Writing formatted text files when column number of the ouput is uncertain? From: us Date: 31 Jul, 2007 14:40:50 Message: 2 of 11 |
|
stephen: |
|
Subject: Writing formatted text files when column number of the ouput is uncertain? From: Stephen Date: 31 Jul, 2007 15:03:58 Message: 3 of 11 |
|
Thanks for your response. But the output is too big to be exported to spreadsheet, which I assume is what dlmwrite does, if I understand it correctly. |
|
Subject: Writing formatted text files when column number of the ouput is uncertain? From: us Date: 31 Jul, 2007 15:15:56 Message: 4 of 11 |
|
stephen: |
|
Subject: Writing formatted text files when column number of the ouput is uncertain? From: Stephen Date: 31 Jul, 2007 15:33:16 Message: 5 of 11 |
|
That's what HELP says "dlmwrite(filename,M,delimiter,R,C) writes matrix A into an ASCII-format file, using delimiter to separate matrix elements. The data is written to the SPREADSHEET filename, starting at spreadsheet cell R and C, where R is the row offset and C is the column offset. R and C are zero based so that R=0, C=0 specifies the first value in the file, which is the upper left corner." |
|
Subject: Writing formatted text files when column number of the ouput is uncertain? From: us Date: 31 Jul, 2007 15:43:18 Message: 6 of 11 |
|
stephen: |
|
Subject: Writing formatted text files when column number of the ouput is uncertain? From: Stephen Date: 31 Jul, 2007 17:01:34 Message: 7 of 11 |
|
My version is 6.5.1. |
|
Subject: Writing formatted text files when column number of the ouput is uncertain? From: us Date: 31 Jul, 2007 17:22:29 Message: 8 of 11 |
|
stephen : |
|
Subject: Writing formatted text files when column number of the ouput is uncertain? From: Stephen Date: 31 Jul, 2007 17:44:11 Message: 9 of 11 |
|
The output can be read the way you described as long as the output size is small. |
|
Subject: Writing formatted text files when column number of the ouput From: dpb Date: 31 Jul, 2007 14:05:16 Message: 10 of 11 |
|
stephen wrote: |
|
Subject: Writing formatted text files when column number of the ouput From: Stephen Date: 31 Jul, 2007 19:36:08 Message: 11 of 11 |
|
It works! Thanks. |
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.
| Tag Activity for This Thread | ||
|---|---|---|
| Tag | Applied By | Date/Time |
| format | us | 31 Jul, 2007 11:01:16 |
| ascii | us | 31 Jul, 2007 11:01:15 |
| dlmwrite | us | 31 Jul, 2007 11:01:15 |
Contact us at files@mathworks.com
