Re: Writing formatted text files when column number of the ouput is uncertain?
- From: "stephen " <huangj5@xxxxxxxxxxxxxx>
- Date: Tue, 31 Jul 2007 17:01:34 +0000 (UTC)
My version is 6.5.1.
The code is running OK now even though I have an older version. Don't know what went wrong before. However, the matrix dimension got changed.
For example, if the dimension of the matrix is 5*9, when exporting it using dlmwrite function, it no longer appears as a 5*9 matrix in the output file. In your example, the 10*10 matrix became one single line in the output. Any way to keep the orginal dimension of matrix in the output?
Thanks,
Stephen
"us " <us@xxxxxxxxxxxxxxx> wrote in message <f8nlam$3tv$1@xxxxxxxxxxxxxxxxxx>...
stephen:
<SNIP version problem...
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...
bad news: you seem to have an older ML version(?)...
in r2007a it says:
DLMWRITE Write ASCII delimited file.
DLMWRITE('FILENAME',M) writes matrix M into
FILENAME using ',' as the delimiter to
separate matrix elements.
DLMWRITE('FILENAME',M,'DLM') writes matrix M into
FILENAME using the character DLM as the
delimiter.
<...>
furthermore, this works as expected
m=magic(10);
dlmwrite('foo.txt',m,'\t');
what version do you use?
what error do you get?
us
.
- Follow-Ups:
- References:
- Writing formatted text files when column number of the ouput is uncertain?
- From: stephen
- Re: Writing formatted text files when column number of the ouput is uncertain?
- From: us
- Re: Writing formatted text files when column number of the ouput is uncertain?
- From: stephen
- Re: Writing formatted text files when column number of the ouput is uncertain?
- From: us
- Re: Writing formatted text files when column number of the ouput is uncertain?
- From: stephen
- Re: Writing formatted text files when column number of the ouput is uncertain?
- From: us
- Writing formatted text files when column number of the ouput is uncertain?
- Prev by Date: Re: Passing C struct out to Matlab space
- Next by Date: Populating a matrix with pixel values
- Previous by thread: Re: Writing formatted text files when column number of the ouput is uncertain?
- Next by thread: Re: Writing formatted text files when column number of the ouput is uncertain?
- Index(es):
Relevant Pages
|