Rhent
2008-12-15, 10:40
程序段为:
fid1=fopen('input.txt','rt');
s=fscanf(fid1,'%s');
fclose(fid1);
加入input.txt中内容为:
Skip to content.Skip to bbc.co.uk navigation.Skip to bbc.co.uk search.The BBC is not responsible for the content of external internet sites.
结果为:
s=Skiptocontent.Skiptobbc.co.uknavigation.Skiptobbc.co.uksearch.TheBBCisnotresponsibleforthecontentofexternalinternetsites.
读入的txt文件为一段纯英文字符串,读入工作空间后空格丢失,用了多种读入函数(dlmread,fread等)均无法解决,请教高人。
fid1=fopen('input.txt','rt');
s=fscanf(fid1,'%s');
fclose(fid1);
加入input.txt中内容为:
Skip to content.Skip to bbc.co.uk navigation.Skip to bbc.co.uk search.The BBC is not responsible for the content of external internet sites.
结果为:
s=Skiptocontent.Skiptobbc.co.uknavigation.Skiptobbc.co.uksearch.TheBBCisnotresponsibleforthecontentofexternalinternetsites.
读入的txt文件为一段纯英文字符串,读入工作空间后空格丢失,用了多种读入函数(dlmread,fread等)均无法解决,请教高人。