write zero as blank

1 view (last 30 days)
Neesha
Neesha on 4 Dec 2014
Edited: Guillaume on 4 Dec 2014
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

Accepted Answer

Guillaume
Guillaume on 4 Dec 2014
Edited: Guillaume on 4 Dec 2014
c = num2cell(m);
c(m == 0) = {[]};
xlswrite('somefile.xlsx', c);
  1 Comment
Neesha
Neesha on 4 Dec 2014
ok, will try that, thanks !

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!