matlab中读取txt文件读入时如何不让空格丢失
程序段为:fid1=fopen('input.txt','rt');s=fscanf(fid1,'%s');fclose(fid1);加入input.txt中内容为:Sk...
程序段为:
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等)均无法解决,请教高人。 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询