I'm using Matlab 2012a to append a <1x19 cell> to a CSV file using dlmwrite. The cell array includes 17 numbers and 2 blanks. The result: 17 values written to the target csv file, but the two blanks missing. I am using the codes below:
Output=num2cell([var1,var2,var3....var19]);
Output(cellfun(@isnan,Output)) = {[]};
dlmwrite('Target.csv',Output_m,'-append');
When I run the codes in command window I can see the blanks appear in the Output:
Output =
Columns 1 through 10
[19] [2] [137.5994] [0] [] [501.3610] [38.4230] [0] [0] [4.9160]
Columns 11 through 19
[4.9160] [38.4230] [0] [38.4230] [501.6580] [] [-1.2590] [0] [0]
But when appended to the csv file, the blanks disappear.
Thanks.