Rank: 2804 based on 15 downloads (last 30 days) and 1 file submitted
photo

Francis Barnhart

E-mail

Personal Profile:

Read more about Francis Barnhart at http://francisbarnhart.com/

Professional Interests:

 

Watch this Author's files

 

Files Posted by Francis
Updated   File Tags Downloads
(last 30 days)
Comments Rating
06 Apr 2005 CELLWRITE Cellwrite writes mixed cell array data to a CSV file. Author: Francis Barnhart cell array, csvwrite, data import, csv, data export, mixed 15 11
  • 4.9
4.9 | 10 ratings
Comments and Ratings on Francis' Files View all
Updated File Comment by Comments Rating
21 Aug 2011 CELLWRITE Cellwrite writes mixed cell array data to a CSV file. Author: Francis Barnhart Mohammad
06 May 2011 CELLWRITE Cellwrite writes mixed cell array data to a CSV file. Author: Francis Barnhart Moore, Richard

Works great! I changed the 'w' to an 'a' in the fopen statement so that I could add lines to the csv in successive calls in a loop.

13 Aug 2009 CELLWRITE Cellwrite writes mixed cell array data to a CSV file. Author: Francis Barnhart Majeau-Bettez, Guillaume

Thanks so much, this is a lifesaver. Great when working on Linux OS. I added one line to replace any comma already existing in the texts by '_' before writing contents. Important if you have chemical names in there.
...
elseif isempty(contents)
            contents = '';
        else
            contents=strrep(contents, ',' , '_' );
       end

11 Jul 2009 CELLWRITE Cellwrite writes mixed cell array data to a CSV file. Author: Francis Barnhart Akien, Geoffrey

I've been using this for a while now and its great but...one of the tests for changing numbers into text needs adjusting for logicals...

I change:
if isnumeric(contents)

into

if isnumeric(contents) || islogical(contents)

Because the logical class is not including in isnumeric (helpfully). It may add a small speed hit, but it increases the robustness a little.

Thanks for the program though!

10 Apr 2009 CELLWRITE Cellwrite writes mixed cell array data to a CSV file. Author: Francis Barnhart Delaney, Kevin J.

Did just what I needed! Well done!

Top Tags Applied by Francis
cell array, csv, csvwrite, data, data export
Files Tagged by Francis
Updated   File Tags Downloads
(last 30 days)
Comments Rating
06 Apr 2005 CELLWRITE Cellwrite writes mixed cell array data to a CSV file. Author: Francis Barnhart cell array, csvwrite, data import, csv, data export, mixed 15 11
  • 4.9
4.9 | 10 ratings

Contact us at files@mathworks.com