I have a structure (see image) with 9 fields and 100 rows. Each row is a 200x1 double. As each row has exactly the same dimensions, I was wondering if there was a function I could use to open up the rows to make a long table with 20000 rows?

 採用された回答

Ameer Hamza
Ameer Hamza 2020 年 11 月 3 日

0 投票

Try this
T = array2table(cell2mat(squeeze(struct2cell(trai)).'), 'VariableNames', fieldnames(trai))

2 件のコメント

Aleya Marzuki
Aleya Marzuki 2020 年 11 月 3 日
worked perfectly, thank you!
Ameer Hamza
Ameer Hamza 2020 年 11 月 3 日
I am glad to be of help!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Structures についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by