Convert multiple struct to table

조회 수: 19 (최근 30일)
Benedikt Skurk
Benedikt Skurk 2022년 4월 21일
댓글: Chunru 2022년 4월 22일
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.
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:
Can someone please help me?
Thanks a lot!!!
  댓글 수: 1
Chunru
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 CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by