读取 importdata函数: x=importdata('data.txt'); 写入 fid=fopen('result.txt','w'); fprintf(fid,'%d ',out); fclose(fid);