海量数据分类的MATLAB程序代码
2012-2-23 22:18
阅读:5432
标签:数据, 程序
clear;fclose('all');
fidin=fopen('D:HUST.phn');
fidout=fopen('D:HUST.phn');
if fidin==-1
disp('请将文件HUST.phn放入D盘')
elseif isdir('D:HUST')==0
newf=system(['mkdir ',['D:' 'HUST']]);
else
while ~feof(fidin)
tline=fgets(fidin);
if tline(1)=='"'
fclose(fidout);
str=tline(5:length(tline)-6);
str(str==('/'))='_';
fidout=fopen(['D:HUST' str '.phn'],'w');
else fprintf(fidout,'%s',tline);
end
end
fclose(fidout);
end
fidin=fopen('D:HUST.phn');
fidout=fopen('D:HUST.phn');
if fidin==-1
disp('请将文件HUST.phn放入D盘')
elseif isdir('D:HUST')==0
newf=system(['mkdir ',['D:' 'HUST']]);
else
while ~feof(fidin)
tline=fgets(fidin);
if tline(1)=='"'
fclose(fidout);
str=tline(5:length(tline)-6);
str(str==('/'))='_';
fidout=fopen(['D:HUST' str '.phn'],'w');
else fprintf(fidout,'%s',tline);
end
end
fclose(fidout);
end
转载本文请联系原作者获取授权,同时请注明本文来自潘林科学网博客。
链接地址:https://wap.sciencenet.cn/blog-111625-540734.html?mobile=1
收藏
当前推荐数:0
推荐到博客首页
网友评论1 条评论