Unpacking structured Data with multiple Fields
19 views (last 30 days)
Show older comments
Andy Wileman
on 13 Mar 2021
Commented: Andy Wileman
on 16 Mar 2021
Hi,
I was wondering if anyone has any experience of extracting data variables from mulitple structures?
What I would like to do is extract the data contained in .measurement.transient.timeDomain for each structure, see pic below The data is contained as structures with 110 fields. I can do this for one of the Field lines at a time, but is there a way to extract all the data in one go? The picture below show the structure and the bottom pic shows the data in a single 1x1 timeDomain structure.
Kind regards,
Andy
2 Comments
Walter Roberson
on 13 Mar 2021
? Your image implies 5 fields for each time domain structure, with time domain being part of a struct array. Is it possible that it is the structure array that has 110 elements, each of which is a struct with 5 fields.
Accepted Answer
Aghamarsh Varanasi
on 16 Mar 2021
Hi Andy,
If you want to create a variable to store the data contained in 'measurement.transient.timeDomain', you can use the following syntax. This will save all the structures in a cellarray.
data = {measurement.transient.timeDomain}.';
Hope this helps
2 Comments
More Answers (0)
See Also
Categories
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!