作者qqqq99369 (500)
看板MATLAB
标题[讨论] 资料分割後输出excel
时间Sun Nov 4 20:35:29 2018
想请问大家要如何将资料一一存档,自己打的程式码如下,但是不知为何会覆写过去,请大家帮帮忙
i=5;
while i<750
xlimits = [0,80];
ylimits = [i-5,i];
zlimits = [0,15];
player = pcplayer(xlimits, ylimits, zlimits);
indices = find(s1c1.Location(:, 2) >= i-5 ...
& s1c1.Location(:, 2) <= i ...
& s1c1.Location(:, 1) >= 0 ...
& s1c1.Location(:, 1) <= 80);
pc = select(s1c1, indices);
A=[pc.Location(:, 1),pc.Location(:, 2),pc.Location(:, 3),pc.Intensity(:, 1)];
xlswrite('data',A);
filename = ['data_' num2str(i) '.xlsx'];
i=i+5;
end
end
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 101.137.29.78
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/MATLAB/M.1541334931.A.7C9.html
※ 编辑: qqqq99369 (101.137.29.78), 11/04/2018 20:40:01
1F:→ name0625: syntax: xlswrite(filename, A)11/05 00:11
2F:→ name0625: 你再看看你的xlswrite就知道问题了…11/05 00:11我试过了,已经可以了,谢谢帮忙
※ 编辑: qqqq99369 (101.137.29.78), 11/05/2018 10:37:00