想请问大家要如何将资料一一存盘,自己打的程式码如下,但是不知为何会覆写过去,请大家帮帮忙
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