将txt文件转化为mat文件

%%参考http://blog.csdn.net/afgh2587849/article/details/5996619
%%http://hi.baidu.com/dreamflyman/item/ed5137f19c742d0ec7dc4577
load('D:\data.txt');
little_cell=cell(1,2);
CellArr=cell(1,2);
Arr=zeros(2,5);
m=0;
for num=1:2
  for i=1:2
    for j=1:5
       m=m+1;
       Arr(i,j)=data(m);
    end
  end
CellArr{1,num}=Arr;
Arr=zeros(2,5);
end
little_cell=CellArr;
%将CellArr保存为mat文件
%save('D:\data_new.mat','CellArr');
%save data_new.mat CellArr;
t=1;
save('data_new.mat','little_cell','t');

你可能感兴趣的:(将txt文件转化为mat文件)