Changing format of a Struct
14 views (last 30 days)
Show older comments
Hi,
I am just looking to change the format of my struct That I have at the moment.
So currently, I have a 7x1 Struct with 6 fields 

However, I want to change this to become a 1x1 struct with 6 fields, with the fields in the left hand side
Here is an example of how I would like my struct to look like 

How do I go about changing this?
Thanks!
Answers (1)
Andrew Janke
on 31 Jan 2020
You should consider using a Matlab table array instead of a struct for cases like this. They're more suitable for data in this format: it'll give you data shape validation and friendlier display output.
0 Comments
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!