Code covered by the BSD License  

Highlights from
StructBrowser

4.75

4.8 | 9 ratings Rate this file 7 Downloads (last 30 days) File Size: 26.97 KB File ID: #3523
image thumbnail

StructBrowser

by Hassan Lahdili

 

30 May 2003 (Updated 19 Jun 2009)

StructBrowser, GUI for browsing any structure (or nested structures) and plotting its fields.

| Watch this File

File Information
Description

The CRC-StructBrowser is designed to expose the contents of all variables of class struct to any depth and plot any of the components. The tool is very useful especially for nested structures. It displays the structure in a tree format starting from the first level. The tree is expanded (or shrunk) to the corresponding level by double-clicking.

Syntax:
StructBrowser
StructBrowser_gui_g(cell_struct)

The easiest way of starting up the GUI is to type the command "StructBrowser" while the workspace contains some information (the same command can be used in the debug mode).

The GUI can also be launched by typing: StructBrowser_gui_g(cell_struct)
in the MatLab command. cell_struct is a cell of size (2 X N), where N is the number of structures to browse. The first row of cell_struct contains all the structures' names, and the second row contains all the corresponding values. Assuming your workspace contains the 3 structures struct_1, struct_2 and struct_3, cell_struct is described by the following:

cell_struct = ...{'struct_1', 'struct_2', 'struct_3'; ...
  struct_1, struct_2, struct_3};

In the case of the base workspace, the function "copy_all_struct" is provided to copy all variables of class struct from workspace and store them in a cell array. The syntax of this function is:

cell_struct = copy_all_struct;

MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (9)
29 Sep 2003 Peter Guo

GOOD...useful

19 Jan 2004 David Graham

A really useful tool. Makes browsing a struct array very simple. Highly recommended

02 Feb 2004 Wei Li

amazing! save me a lot of typing. more like... upgrading from typing cd.. etc. in dos to apple gui!

18 Jun 2004 Zhenyu Jiang  
24 Jun 2005 Aldo Caraceto

Powerful, specially if you use it in combination with ToSavedWorkspace, since you can export in a image the contents of your workspace. Unfortuanetly, except fig extension,the only image file type effective in order to export an image is bmp: for images of other formats, e.g. jpg, png, pdf...it's been lost the treeview object

15 Jul 2005 Taoufik Mbarek  
25 May 2007 Matt McCormick  
06 Jan 2008 Eric Lee

A good tool!
Note: I made a small change to line 182, to avoid the need to copy the exp_struct_icons directory. This may make the tool more portable.

% pth = [matlabroot, '\work\exp_struct_icons\'];
            pth = [fileparts(mfilename('fullpath')) '\exp_struct_icons\']

06 Jan 2008 Eric Lee

Sorry, my previous comment was meant for the newer version, ExploreStruct, at
http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=7828&objectType=file

Please login to add a comment or rating.
Updates
13 Jun 2003

Summary and description are updated to clarify the utility of this tool.

18 Dec 2003

Add screenshot.

19 Jun 2009

BSD license

Tag Activity for this File
Tag Applied By Date/Time
structures Hassan Lahdili 22 Oct 2008 07:02:21
cell arrays Hassan Lahdili 22 Oct 2008 07:02:21
utilities Hassan Lahdili 22 Oct 2008 07:02:21
browse Hassan Lahdili 22 Oct 2008 07:02:21
browse structure Cristina McIntire 06 Feb 2009 10:51:24

Contact us at files@mathworks.com