Info
此问题已关闭。 请重新打开它进行编辑或回答。
write a structure into the excel file not writing the structure contents
1 次查看(过去 30 天)
显示 更早的评论
I use
struct2table(strucutre name,'AsArray',1)
to convert the strctrue to the table and then using writetable to write it on the excel file.
It does the job but not include the contents of the sturcture fields in the excel file.The output excel file is this:
the text in the first row are field names. The content is not included.
Any idea?
0 个评论
回答(1 个)
Mehmed Saad
2020-4-16
x.full_100 = rand(10,1);
x.cor_thre = rand(10,1);
x.full_65 = rand(10,1);
x.rhib = rand(10,1);
T= struct2table(x);
writetable(T,'va.xlsx')
2 个评论
Mehmed Saad
2020-4-17
- all the variables are column vector
- i didn't use 'AsArray'
- i get this excel file after runing code
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!