Path: news.mathworks.com!not-for-mail
From: "Daphne " <daphnew_too_nospam@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Spaced headers with dlmwrite
Date: Sun, 12 Aug 2007 13:56:39 +0000 (UTC)
Organization: Technion
Lines: 28
Message-ID: <f9n3in$mjf$1@fred.mathworks.com>
References: <f9kjbe$pns$1@fred.mathworks.com> <f9mmso$75h$1@fred.mathworks.com>
Reply-To: "Daphne " <daphnew_too_nospam@yahoo.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1186926999 23151 172.30.248.37 (12 Aug 2007 13:56:39 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 12 Aug 2007 13:56:39 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1066798
Xref: news.mathworks.com comp.soft-sys.matlab:423575



Works great. Thanks !
Now I have to re-figure my alignments... 

Daphne


"us " <us@neurol.unizh.ch> wrote in message 
<f9mmso$75h$1@fred.mathworks.com>...
> Daphne:
> <SNIP <dlmwrite> conundrum...
> 
> one of the solutions
> 
> % the data
>      fnam='foo.txt'; % <- your data file
>      hdr={'a','bb','ccc'};
>      m=magic(3);
> % the engine
>      txt=sprintf('%s\t',hdr{:});
>      txt(end)='';
>      dlmwrite(fnam,txt,'');
>      dlmwrite(fnam,m,'-append','delimiter','\t');
> % the result
>      type(fnam)
> 
> us