function cellArray2file(CA, fname)
% CA is a cell array of strings.
% Create a file with the name
% specified by the string fname.
% The i-th line in the file is CA{i}

fid= fopen(fname, 'w');
for i= 1:length(CA)
fprintf(fid, '%s\n', CA{i});
end
fclose(fid);