Great function! Love it!
Is there a way to add any formatting to the text? For example changing the font style (e.g., bold, oblique etc.) and the color?
Many thanks!
5
30 Jul 2012
Write Cell Array to Text File
A cell array is written to a delimited output file, incl. options for appending & custom delimiters.
This utility doesn't work consistently for me. Specific problems:
1) Documentation states that file name is taken as the file specification. However, the function occasionally generates errors like the following:
------------------------------
Error using fprintf
Invalid file identifier. Use fopen to generate a valid file identifier.
Error in dlmcell (line 98)
fprintf(output_file,'%s',output{i,j});
------------------------------
fprintf() requires a file handle as first argument. I'll therefore have to dig into this F/E function & possibly modify.
2) This function doesn't return any values, even on error. Instead, it prints error messages at the command-line & returns normally. This is poor programming practice & makes it inconvenient to deploy within another function where error-detection must be handled programmatically.
One star subtracted for each of these problems.
3
24 Jul 2012
Write Cell Array to Text File
A cell array is written to a delimited output file, incl. options for appending & custom delimiters.
Great work, absolutely phenomenal for what I'm trying to do. I have one problem though. In my cell array that's being printed, one of my columns has a comma in it i.e. "contract 5,000 bushels" turns into "contract 5" "000 bushels" Is there a way to fix this?
Comment only