(1)直接保存为txt文件:
>> a=rand(1,2) a = 0.1419 0.4218 >> fid=fopen('a.txt','wt'); >> fprintf(fid,'%6.4f %6.4f\n',a); >> fclose(fid); >>
>> clear >> load a.mat >> save b.txt -ASCII a;
(3)将txt文件转存为mat文件:
>> load a.txt >> save a.mat a;
原文地址:http://blog.csdn.net/u013476464/article/details/41729457