| 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 |
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.
Contact us at files@mathworks.com