作者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/m.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