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

14 visualizaciones (últimos 30 días)
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]

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 15 de Feb. de 2021
Editada: MathWorks Support Team el 17 de Feb. de 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:

Más respuestas (0)

Categorías

Más información sobre Class Introspection and Metadata en Help Center y File Exchange.

Productos


Versión

R14SP1

Community Treasure Hunt

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

Start Hunting!

Translated by