transfer Matlab Workspace to Excel
10 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
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)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!