Code covered by the BSD License  

Highlights from
Structure display

3.81818

3.8 | 11 ratings Rate this file 55 Downloads (last 30 days) File Size: 1.82 KB File ID: #13831
image thumbnail

Structure display

by

 

01 Feb 2007 (Updated )

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   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (12)
15 Feb 2014 John Yang

This is what I want! good job.

20 Jan 2014 Felipe G. Nievinski

a mnemonic after matlab's builtin celldisp:

function varargout = structdisp (varargin)
[varargout{1:nargout}] = fn_structdisp (varargin{:});
end

28 Jan 2013 Daniel Golden

Does just what I wanted

05 Jun 2012 Thomas Deneux

Comments from B. Roossien and Jeff have been adressed in the June 2012 version.

06 Apr 2012 Francesco Montorsi

very nice for me!! thanks!

06 Nov 2011 marc

Useful for me

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.

09 Jan 2011 Simon

simple and neat

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

22 Jun 2009 Markus Buehren  
07 May 2009 Jeff Harris

Quick and effective display of structs

04 Feb 2007 B. Roossien

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

Updates
08 Feb 2007

change summary

20 Sep 2007

added help and array/cell display

05 Jun 2012

bux fixes

Contact us