No BSD License  

Highlights from
Structure outline

4.8

4.8 | 11 ratings Rate this file 12 Downloads (last 30 days) File Size: 18.9 KB File ID: #13500

Structure outline

by

 

28 Dec 2006 (Updated )

Prints the hierarchy outline of a structure with optionally, field values.

| Watch this File

File Information
Description

This function prints the hierarchical outline of a structure to the command window or a file. Optionally, field values can be printed as well.

type "help strucdisp" for more information about this function.

Acknowledgements

Display Structure inspired this file.

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (13)
14 Mar 2014 Stefan

Great tool! I changed field(iFieldElement) to Field(iFieldElement) in line 294 to make it work for me (probably a typo).

31 May 2011 Roger Parkyn

Worked for me.

19 Oct 2010 Matt Brunner

Awesome! Exactly what I was looking for. Thank you.

24 Jun 2009 Joseph

This is really great. Good job.

28 May 2009 Benjamin  
06 Mar 2009 Mais

very useful

03 Apr 2008 Juergen Kurzmann

This is a really helpful function for getting a concise overview of data structures (struct) as well as for their documentation!

08 Mar 2008 B. Roossien

I've fixed a number of bugs and added some improvements following feedback from Holger Krause and Juergen Kurzmann. The new file should be available in 2-3 days.

05 Feb 2008 Rahul Y D

thank you very much really helpful function

23 Jan 2008 Holger Krause

I'm using this function to print out nicely formatted log files containing parameters of various types. strucdisp is just the right tool for this job.

There are three smaller issues:

1. It would be nice, to handle logicals separately (output as text 'true' or 'false' at least for single values).

2. The line for numeric vectors is missing a space in front of the opening bracket.

3. In some cases empty fields get duplicated and occur one time as an empty string '' and a second time as an empty double array [ ].

10 May 2007 B. Roossien

This function has been updated. Some bugs were fixed. Its performance is enhanced and new functionalities (printing small matrices and handling structure arrays) have been added.

09 Jan 2007 John D'Errico

Problem resolved. My new rating is now the correct one.

This will be a useful utility for those of us who sometimes generate complicated structures.

08 Jan 2007 John D'Errico

I do like this utility, but there is a significant bug. The help states that all arguments but the first are optional. I tried passing in the third argument, but not the second, supplying an empty argument to the second as a placeholder. This should be acceptable. Its also the standard way that Matlab tools use to allow some arguments to be defaulted.

strucdisp(s,[])
??? Operands to the || and && operators must be convertible to logical scalar values.

Error in ==> strucdisp>get_fields at 151
if (depth < 0) || (indent + 1 < depth)

Error in ==> strucdisp at 64
liststr = get_fields(structure, 0, depth, flag_value, max_length);

Arguments that take on a default value should test for empty values provided using isempty, and if empty, then provide the default.

I'd have rated this a 5 otherwise, and I will happily raise my rating to that level if it is repaired.

Updates
09 Jan 2007

Bug fix following the feedback provided by John D'Errico

08 May 2007

added new functionalities and increased perfomance.

Contact us