MATLAB: Write zero as blank

excelxlswrite

Hi All,
I am priniting my matrix to excel file using xlswrite. I want to write out my zero as blanks/space
how do i do it?
Thanks

Best Answer

c = num2cell(m);
c(m == 0) = {[]};
xlswrite('somefile.xlsx', c);
Related Question