Is there a command line functionality which displays a structure tree at the MATLAB command window in MATLAB 7.0.1 (R14SP1)?

17 views (last 30 days)
I would like to be able to view my full structure tree using a MATLAB command without having to access each field of my structure to view the structure underneath it.
For example, if I have the following structure:
myStruct.time = 0:.01:2*pi;
myStruct.signal.units = 'radians';
myStruct.signal.values = sin(0:.01:2*pi);
I would like to be able to see the content of my "signal" field when I view the content of my structure "myStruct". Currently, typing "myStruct" on my command window will output only the content of my top most level fields of my structure. I would need to type "myStruct.signal" to view the content of my lower level fields as follows:
>> myStruct
myStruct =
time: [1x629 double]
signal: [1x1 struct]
>> myStruct.signal
ans =
units: 'radians'
values: [1x629 double]

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 15 Feb 2021
Edited: MathWorks Support Team on 17 Feb 2021
The ability to view the full structure tree is not available in MATLAB.
As a workaround, there are several struct browsers on MATLAB central. The following is a link to one that lists the structure of the struct and the contents of the fields in a GUI:

More Answers (0)

Categories

Find more on Structures in Help Center and File Exchange

Products


Release

R14SP1

Community Treasure Hunt

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

Start Hunting!