%运行结果见附件
%init data
x = ones(80,80,'double');
for m=1:1:80
    for n=1:1:80
        x(m,n)=m+n*0.01;
    end
end
%get 40x40 cell
c=mat2cell(x,ones(1,40)*2,ones(1,40)*2);
%output
for m=1:1:length(c)
    out=c{m,m};
    sheetname=strcat('sheet',num2str(m));
    xlswrite('output.xls',out,sheetname);
end
disp('Finished');
附件列表