[討論] 資料分割後輸出excel

作者: qqqq99369 (500)   2018-11-04 20:35:29
想請問大家要如何將資料一一存檔,自己打的程式碼如下,但是不知為何會覆寫過去,請大家幫幫忙
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
作者: name0625 (lawpy)   2018-11-05 00:11:00
syntax: xlswrite(filename, A)

Links booklink

Contact Us: admin [ a t ] ucptt.com