Rank: 18244 based on 0 downloads (last 30 days) and 0 file submitted
photo

Robert

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Robert
Updated File Comments Rating
09 Aug 2011 Cell Array to CSV-file [cell2csv.m] Writes a cell array into a comma separated values text file (*.csv) Author: Sylvain Fiedler

Nice m-script. Here a diff to account for cellstr contents and empty cells:
diff cell2csv.m cell2csv_orig.m
70,73c70,72
< if isempty(var)
< continue
< end
<
---
> % OUTPUT value
> fprintf(datei, '%s', var);
>
75c74
< if s ~= 1 %size(cellArray, 2)
---
> if s ~= size(cellArray, 2)
78,86d76
<
< % OUTPUT value
< if ischar(var)
< fprintf(datei, '%s', var);
< elseif iscellstr(var)
< fprintf(datei, '%s', var{1});
< end
<
<

Contact us