<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/214722</link>
    <title>MATLAB Central Newsreader - csvwrite ?</title>
    <description>Feed for thread: csvwrite ?</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by 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>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Tue, 19 Aug 2008 07:22:20 -0400</pubDate>
      <title>Re: csvwrite ?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/214722#596272</link>
      <author>RexGermania</author>
      <description>Raju Gain schrieb:&lt;br&gt;
&amp;gt; Hello Everyone,&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I am trying to write a 2 dimensional array variable with 6 &lt;br&gt;
&amp;gt; rows and 4 columns into a csv file using csvwrite. my &lt;br&gt;
&amp;gt; first row is the column headers. I am not sure if csvwrite &lt;br&gt;
&amp;gt; can write headers? I tried removing the headers and it &lt;br&gt;
&amp;gt; worked fine but with the headers throws an error.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; 'A'    'B'    'C'    'D'&lt;br&gt;
&amp;gt;     [           1]    [11]    [12]    [13]&lt;br&gt;
&amp;gt;     [           2]    [21]    [22]    [23]&lt;br&gt;
&amp;gt;     [           3]    [31]    [32]    [33]&lt;br&gt;
&amp;gt;     [           4]    [41]    [42]    [43]&lt;br&gt;
&amp;gt;     [           5]    [51]    [52]    [53]&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Can anyone tell me a way to write the values with the &lt;br&gt;
&amp;gt; headers into a CSV file? &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks&lt;br&gt;
This should be a good starting point. I modified Francis Barnhart's &lt;br&gt;
function CELLWRITE to do the same thing for me sometime ago. You may &lt;br&gt;
change the permisions in fopen to 'a'   (append). Then call the function &lt;br&gt;
twice:&lt;br&gt;
1st to write the header&lt;br&gt;
2nd to write the array&lt;br&gt;
&lt;br&gt;
You'll find it at MATLAB Central File exchange. I'm not sure if I'm &lt;br&gt;
allowed to copy and paste hier!&lt;br&gt;
&lt;br&gt;
Author:  	Francis Barnhart&lt;br&gt;
Summary: 	Cellwrite writes mixed cell array data to a CSV file.&lt;br&gt;
MATLAB Release: 	R13&lt;br&gt;
Description: 	This function implements the basic functionallity of &lt;br&gt;
csvwrite but operates on cell arrays of mixed data (numeric and string) &lt;br&gt;
instead of arrays of numeric data.&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=7363&amp;objectType=file&quot;&gt;http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=7363&amp;objectType=file&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
RexGer</description>
    </item>
    <item>
      <pubDate>Mon, 18 Aug 2008 16:42:02 -0400</pubDate>
      <title>csvwrite ?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/214722#575460</link>
      <author>Raju Gain</author>
      <description>Hello Everyone,&lt;br&gt;
&lt;br&gt;
I am trying to write a 2 dimensional array variable with 6 &lt;br&gt;
rows and 4 columns into a csv file using csvwrite. my &lt;br&gt;
first row is the column headers. I am not sure if csvwrite &lt;br&gt;
can write headers? I tried removing the headers and it &lt;br&gt;
worked fine but with the headers throws an error.&lt;br&gt;
&lt;br&gt;
'A'    'B'    'C'    'D'&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[           1]    [11]    [12]    [13]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[           2]    [21]    [22]    [23]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[           3]    [31]    [32]    [33]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[           4]    [41]    [42]    [43]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;[           5]    [51]    [52]    [53]&lt;br&gt;
&lt;br&gt;
Can anyone tell me a way to write the values with the &lt;br&gt;
headers into a CSV file? &lt;br&gt;
&lt;br&gt;
Thanks</description>
    </item>
  </channel>
</rss>

