How to automatically store values into an excel sheet through matlab?

1 回表示 (過去 30 日間)
Ihtisham Khan
Ihtisham Khan 2018 年 4 月 17 日
回答済み: giovanacgois 2018 年 5 月 12 日
Hello, I have a program that generate different values and i want them to be stored in an excel sheet automatically. For demo purpose see the following code,
if true
% for i=1:10
% for j=1:10
k=i*j;
end
end
end
I want k to be stored in an excel sheet, automatically.
Thanks.

採用された回答

giovanacgois
giovanacgois 2018 年 5 月 12 日
You can do:
for i=1:10
for j=1:10
k=i*j;
M(i,j)=k;
end
end
xlswrite('filename.xls', M, 1);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by