Code covered by the BSD License  

Highlights from
Structure display

3.57143

3.6 | 7 ratings Rate this file 43 Downloads (last 30 days) File Size: 1.81 KB File ID: #13831
image thumbnail

Structure display

by Thomas Deneux

 

01 Feb 2007 (Updated 24 Sep 2007)

simple recursive display of a structure content in Matlab

| Watch this File

File Information
Description

This function is very simple and recursively displays the fields and sub-fields of a Matlab structure using the built-in 'disp' function.

MATLAB release MATLAB 7.3 (R2006b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (7)
04 Feb 2007 B. Roossien

No H1-line, no help, no comments, no array support. Too simple

07 May 2009 Jeff Harris

Quick and effective display of structs

22 Jun 2009 Markus Buehren  
30 Oct 2009 Thomas Vanaret

Looks good

Display could be a little improved and some diplayed line could be omitted (nested nested nested nested structures....) but all fields are displayed and one can quickly know where is the field

09 Jan 2011 Simon

simple and neat

10 Jun 2011 Jeff

Love the concept... A couple of notes:

1) I'd recommend creating an else condition to the 'if' that starts on line 49. I'm running into a case where nsub is never initialized if you set CELLRECURSIVE to false and has an error.

2) I'd recommend changing on line 90 size(a,1)>1 to (size(a,1)>1 || size(a,2)>1) so that it can display row vectors as well although they do display a little messy.

06 Nov 2011 marc

Useful for me

Please login to add a comment or rating.
Updates
08 Feb 2007

change summary

20 Sep 2007

added help and array/cell display

24 Sep 2007

change title

Tag Activity for this File
Tag Applied By Date/Time
structures Thomas Deneux 22 Oct 2008 08:59:06
cell arrays Thomas Deneux 22 Oct 2008 08:59:06
display recursive Thomas Deneux 22 Oct 2008 08:59:06
utilities Thomas Deneux 22 Oct 2008 08:59:06
structures Nityanandswami Mahapurush 19 Nov 2009 10:04:36
display recursive stefan suess 14 Sep 2011 10:22:36

Contact us at files@mathworks.com