用fopen 选项是'at+'
比如
flag1为一个多行3列的cell型数据
str0=cell(1,3);
for i=1:3
str0{i}=flag1(:,i);
end
s2='';
for i=1:3
s2=strcat(s2,str0{i},',');
end
fid2 = fopen ('d:/flag.csv', 'at');
for k=1:size(s2,1)
fprintf(fid2,'%s\n',s2{k});
end
fclose(fid2);