I am generating an Excel file through MATLAB and I have empty cells in the middle of it. Here is the code I am using to initialize an empty matrix:
newfile = cell(5,5);
[newfile{:}] = deal('');
[newfile{:}] = deal(' ');
I then do some processing and write the data to a file using XLSWRITE. The spreadsheet ends up having some empty cells and some data. Is there a command by which I can delete the empty rows, without effecting the rows which have data in them?
Another question:
Is there a way to append onto this Excel file? I run this file everyday and would like to automatically add data rather than manually copying and pasting everyday.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Addition to above question:
If my output file looks like
1.8 3 -4.7
1.87 3.9 -5.8
1.84 2.8 -4.3
2 3.2 -4.7
2 3.7 -6
2 3.6 -5.2
3 4.3 -6.513 4.2 13.1
12 3.5 -6.3
1.65 1.9 -4.4
So how do i delete the empty rows when its not in cell as cellfun does not work for this