t=0:1023;
d=fix(sin(2*pi*t/256)*10^3);
for i=1:1024
if d(i)<0
b=dec2bin(2^11+d(i),11);
else
b=dec2bin(d(i),11);
end
end
dlmwrite('yourfile.txt',d,' ') %把数组d存到yourfile.txt中
load E:\MATLAB_71\work\yourfile.txt %重新读取该文件,文件中的数据
自动保存在yourfile变量中
yourfile