<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154377</link>
    <title>MATLAB Central Newsreader - Spaced headers with dlmwrite</title>
    <description>Feed for thread: Spaced headers with dlmwrite</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2008 by The MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>The MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Sun, 12 Aug 2007 13:56:39 -0400</pubDate>
      <title>Re: Spaced headers with dlmwrite</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154377#387405</link>
      <author>Daphne </author>
      <description>&lt;br&gt;
Works great. Thanks !&lt;br&gt;
Now I have to re-figure my alignments... &lt;br&gt;
&lt;br&gt;
Daphne&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
"us " &amp;lt;us@neurol.unizh.ch&amp;gt; wrote in message &lt;br&gt;
&amp;lt;f9mmso$75h$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Daphne:&lt;br&gt;
&amp;gt; &amp;lt;SNIP &amp;lt;dlmwrite&amp;gt; conundrum...&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; one of the solutions&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; % the data&lt;br&gt;
&amp;gt;      fnam='foo.txt'; % &amp;lt;- your data file&lt;br&gt;
&amp;gt;      hdr={'a','bb','ccc'};&lt;br&gt;
&amp;gt;      m=magic(3);&lt;br&gt;
&amp;gt; % the engine&lt;br&gt;
&amp;gt;      txt=sprintf('%s\t',hdr{:});&lt;br&gt;
&amp;gt;      txt(end)='';&lt;br&gt;
&amp;gt;      dlmwrite(fnam,txt,'');&lt;br&gt;
&amp;gt;      dlmwrite(fnam,m,'-append','delimiter','\t');&lt;br&gt;
&amp;gt; % the result&lt;br&gt;
&amp;gt;      type(fnam)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; us&lt;br&gt;
&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Sun, 12 Aug 2007 10:20:08 -0400</pubDate>
      <title>Re: Spaced headers with dlmwrite</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154377#387392</link>
      <author>us</author>
      <description>Daphne:&lt;br&gt;
&amp;lt;SNIP &amp;lt;dlmwrite&amp;gt; conundrum...&lt;br&gt;
&lt;br&gt;
one of the solutions&lt;br&gt;
&lt;br&gt;
% the data&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fnam='foo.txt'; % &amp;lt;- your data file&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;hdr={'a','bb','ccc'};&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;m=magic(3);&lt;br&gt;
% the engine&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;txt=sprintf('%s\t',hdr{:});&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;txt(end)='';&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dlmwrite(fnam,txt,'');&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dlmwrite(fnam,m,'-append','delimiter','\t');&lt;br&gt;
% the result&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;type(fnam)&lt;br&gt;
&lt;br&gt;
us&lt;br&gt;
</description>
    </item>
    <item>
      <pubDate>Sat, 11 Aug 2007 15:07:26 -0400</pubDate>
      <title>Spaced headers with dlmwrite</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154377#387359</link>
      <author>Daphne W</author>
      <description>&lt;br&gt;
I am using dlmwrite to create a txt file that is exported &lt;br&gt;
into excel. The txt includes text headers and number &lt;br&gt;
matrices. &lt;br&gt;
So far I have been creating a single text header that &lt;br&gt;
includes all the titles that a line in excel will have, &lt;br&gt;
and spacing the titles manually.... &lt;br&gt;
Is there a way to get each title tabbed from the one &lt;br&gt;
preceeding it?&lt;br&gt;
If I use the '\t' option each letter in the title gets a &lt;br&gt;
tab and gets put into a different cell in excel.  &lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
Daphne&lt;br&gt;
</description>
    </item>
  </channel>
</rss>
