merge the cells from a structured array

1 ビュー (過去 30 日間)
Ilias Minas
Ilias Minas 2022 年 11 月 16 日
編集済み: Stephen23 2022 年 11 月 16 日
Hi all,
I created a script to combine together in the same array some mat files.
The outcome is a structured array as seen in the picture attached
Is there any way of creating different arrays with all the data from each cell combined.For example, a seperate array such as time having all the values from each cell.
I tried many things but nothing worked.
Thank you

回答 (1 件)

Stephen23
Stephen23 2022 年 11 月 16 日
編集済み: Stephen23 2022 年 11 月 16 日
Where S is your structure (you have to know what size array you want to get):
time = vertcat(S.time) % 5700x1
time = horzcat(S.time) % 300x19
time = cat(3,S.time) % 300x1x19
etc.

カテゴリ

Find more on Structures in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by