利用MATLAB将文本中的数据写入Excel

利用MATLAB将文本中的数据写入Excel

函数:

function txt_excel(txt, xls)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  将txt文本数据写入Excel
% 参数解释: 1. txt为输入文本名 如:'A.txt'
%           2. xls为Excel名称,如:'A.xls'
%           3. data为存储数据的变量名,如:A
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
data = load(txt);
xlswrite(xls, data); 

end


相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页