fidout = fopen('listout.txt'); %打开读取文件夹
fidin = fopen('listin.txt','w'); %打开写入文件夹
while ~feof(fid)tline=fgetl(fidout); %读取
fprintf(fidin, '%s \n',tline); %写入
end
fclose(fidout);
fclose(fidin);
fidin = fopen('listin.txt','w'); %打开写入文件夹
while ~feof(fid)tline=fgetl(fidout); %读取
fprintf(fidin, '%s \n',tline); %写入
end
fclose(fidout);
fclose(fidin);