Graphically display the 'branch' structure of a struct variable

Version 1.0.0.0 (1.7 KB) by Andrew
Recursive function designed to display the 'branch' structure of struct variables.
1.3K Downloads
Updated 13 Sep 2011

View License

Welcome to my first post!

Recursive function 'structstruct.m' accepts a single input of any class and outputs ASCII to the command window. Currently no function outputs.

For non-structure input, structstruct displays the class and size of the input and then exits. For structure input, structstruct displays the fields and sub-fields of the input in an ASCII graphical printout in the command window. The order of structure fields is preserved.

Has header and commented 'help' text with INPUT/OUTPUT info. Code is decently commented.

I designed this function so I could easily explore the structure of a struct variable without 'digging' through all the fields in the Variable Editor. It serves its purpose very well, but there are surely areas for expanded/improved functionality that I'm not seeing...

Comments and suggestions welcome!

Cite As

Andrew (2024). Graphically display the 'branch' structure of a struct variable (https://www.mathworks.com/matlabcentral/fileexchange/32879-graphically-display-the-branch-structure-of-a-struct-variable), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Structures in Help Center and MATLAB Answers

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0