ourMELONS/matlab/independent/myxlswrite.m
2019-12-16 16:47:21 +01:00

19 lines
No EOL
366 B
Matlab

function myxlswrite(file, A)
% A is a cell matrix, each element is a string
% Lu Cheng, 25.11.2010
h = fopen(file,'w+');
[nRow nCol] = size(A);
for i=1:nRow
%tmpLine = '';
for j=1:nCol-1
if isnumeric(A{i,j})
A{i,j} = num2str(A{i,j});
end
fprintf(h,'%s\t',A{i,j});
end
fprintf(h,'%s\n',A{i,nCol});
end
fclose(h);