I am trying to run the code
c1 = {'string';'data';'cell'};c2 = {1;2;3};xlswrite('features.xls',[c1,c2]);
but get the error Error using xlswrite (line 194) An error occurred on data export in CSV format.
Caused by: Error using dlmwrite (line 104) The input cell array cannot be converted to a matrix.
This happens because, dlmwrite tries to
if (iscell(m)) try m = cell2mat(m); catch error(message('MATLAB:dlmwrite:CellArrayMismatch')); end end
I am using Matlab 2018a on OSX.
Am I missing something here or has the source code changed over the years?
Best Answer