matlab写excel操作
作者:互联网
%%% 写excel 文件测试
clear
clc
title = cell(1,3);%% 表头
title{1} = 'a';
title{2} = 'b';
title{3} = 'c';
xlswrite('str.xls',title);%% 写表头
%%
colNum1 = 'A';%% 起始列
colNum2 = 'C';%% 结束列
rowNum = 10; %% 行数
for iter =1:20
C = iter:iter+3;
Con = num2cell(C);
rowNum = iter + 1;
colNum = [colNum1,num2str(rowNum),':',colNum2,num2str(rowNum)];%% 范围
xlswrite('str.xls',Con,colNum);%% 写入指定行
end
效果如下图
标签:表头,title,%%,excel,iter,num2str,matlab,操作,rowNum 来源: https://blog.csdn.net/atease0001/article/details/120826437