Visualizing multi-dimensional structures in the Workspace

2 views (last 30 days)
I have a structure (struct variable) containing several fields such as name, age, height, etc. I used to only have two indices into this variable: the person's ID number and an experimental condition. This way, I could easily visualise the variable for debug purposes: double-clicking on it in the Workspace gave me first the 2D matrix determined by the indices, and once I clicked on a cell in the matrix I got the corresponding fields of the selected structure.
Now I needed to add one more parameter as an index into the struct, which has therefore become 3D. Visualising it is no longer possible, as the Workspace just shows it as a "4x2x9 struct with 5 fields" but doesn't let me select an index triplet and dig deeper into it. The only way I can peek into the contents is by looking at a specific index combination in the command prompt, e.g. "M(i1,i2,i3).name", but this doesn't give me the overview I wanted.
Can anyone suggest a workaround so that I can visualise the overall contents of the struct variable? Perhaps by first choosing a value for the first index, and then seeing the struct matrix corresponding to the remaining 2 dimensions?
Hopefully my description makes sense, thanks in advance!

Answers (0)

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!