Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Writing formatted text files when column number of the ouput is uncertain?
Date: Tue, 31 Jul 2007 15:43:18 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 28
Message-ID: <f8nlam$3tv$1@fred.mathworks.com>
References: <f8ndon$pv1$1@fred.mathworks.com> <f8nhli$gok$1@fred.mathworks.com> <f8nj0u$eig$1@fred.mathworks.com> <f8njnb$2ke$1@fred.mathworks.com> <f8nkns$mht$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-00-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1185896598 4031 172.30.248.35 (31 Jul 2007 15:43:18 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 31 Jul 2007 15:43:18 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:421870



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