個人的には一度結果を格納して書き出すのがいいかなと思っています。
ここでの a は列ベクトルなのでエクセルにも列ベクトル方向に書き込まれます。
clc,clear,close all;
n = 60;
a = zeros(1,60);
for i = 1:n
a(i) = i;
end
writematrix(a,'sample.xlsx')
随時行う場合は以下をご覧ください。
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!