fengzhiyou 发表于 2008-6-29 11:08

在matlab7.0中用textscan 遇到的问题

我用 textscan读文件, 当文件里有负数时读出的数据就出错,例如:
a=rand(1,10)-0.5;
fid=fopen('a.txt','w');
fprintf(fid,'%f',a);
fclose(fid);
fid=fopen('a.txt','r');
b=textscan(fid,'%f');
fclose(fid);
得到b的数据与a的不一样
请教各位高手答疑!
页: [1]
查看完整版本: 在matlab7.0中用textscan 遇到的问题