Convert multiple struct to table
25 ビュー (過去 30 日間)
古いコメントを表示
Hello everyone,
i want to convert the following struct into a table so every value is displayed, i think there are like 630 values per field.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/972710/image.png)
I already tried struct2table and the following:
a = app.time_series
f = fieldnames(a)
for i = 1:length(f)
x_T = table(num2cell(getfield(a,f {i})));
x_T.Properties.VariableNames = {f{i}};
T = [T, x_T];
end
But everything i get is:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/972715/image.png)
Can someone please help me?
Thanks a lot!!!
1 件のコメント
Chunru
2022 年 4 月 22 日
It seems that the vaviable app.time_series is a structure of structure. Therefore you need to convert that structure of structure into double to form the table.
You can post your variable app.time_series as a .mat file attachment.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!