transfer Matlab Workspace to Excel

14 ビュー (過去 30 日間)
malik abdelli
malik abdelli 2023 年 9 月 24 日
コメント済み: malik abdelli 2023 年 9 月 24 日
Hello
i wanted to know how to transfer the data i have in my workspace to Excel automatically after running my code, my data are only numbers.
For example if this is my Workspace:
i want this to be the excel Table:
how can i do this ?
Thank you.

採用された回答

dpb
dpb 2023 年 9 月 24 日
移動済み: dpb 2023 年 9 月 24 日
Easiest would be to use arrays instead of a zillion sequentially named individual variables; associate a string array of names with them if desired (for the example, it could be simply an expression such as
nColumns=size(yourNewArrayReplacingVariables,2);
tT=array2table(yourNewArrayReplacingVariables,'VariableNames',cellstr(char('a'+[0:N-1].')));
writetable('yourExcelFile.xlsx',tT,'WriteVariableNames',1)
  1 件のコメント
malik abdelli
malik abdelli 2023 年 9 月 24 日
thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by