Path: news.mathworks.com!not-for-mail
From: "us " <us@neurol.unizh.ch>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Writing formatted text files when column number of the ouput is uncertain?
Date: Tue, 31 Jul 2007 17:22:29 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 21
Message-ID: <f8nr4l$kb3$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> <f8nlam$3tv$1@fred.mathworks.com> <f8npte$1cd$1@fred.mathworks.com>
Reply-To: "us " <us@neurol.unizh.ch>
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 1185902549 20835 172.30.248.35 (31 Jul 2007 17:22:29 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 31 Jul 2007 17:22:29 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:421888


stephen :
<SNIP <dlmwrite> conundrum...

> In your example, the 10*10 matrix became one single line in the output...

this is how it looks here (r2007a)

     m=reshape(1:8,2,4);
     dlmwrite('foo.txt',m,',');
     m
     type foo.txt
%{
m =
     1     3     5     7
     2     4     6     8

1,3,5,7
2,4,6,8
%}

us