Is there a command line functionality which displays a structure tree at the MATLAB command window in MATLAB 7.0.1 (R14SP1)?
15 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2009-8-26
编辑: MathWorks Support Team
2021-2-17
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]
采纳的回答
MathWorks Support Team
2021-2-15
编辑:MathWorks Support Team
2021-2-17
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:
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Class Introspection and Metadata 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!