Code covered by the BSD License  

Highlights from
Order all fields

Be the first to rate this file! 2 Downloads (last 30 days) File Size: 1.27 KB File ID: #19459

Order all fields

by Paul A.M. Bune

 

04 Apr 2008 (Updated 04 Apr 2008)

Order fields of a structure array on all levels

| Watch this File

File Information
Description

A recursive version of MatLab function "orderfields".

Like "orderfields", function "OrderAllFields" orders fieldnames in a structure array by sorting them alphabetically. Contrary to "orderfields", which only orders top-level fields, function "OrderAllFields" orders fields of a structure array on all its levels (thereby also passing levels which have a cell array structure rather than a structure array structure).

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
Sort Structure

MATLAB release MATLAB 7.2 (R2006a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
structures Paul A.M. Bune 22 Oct 2008 09:56:27
cell arrays Paul A.M. Bune 22 Oct 2008 09:56:27
orderfields Paul A.M. Bune 22 Oct 2008 09:56:27
structure array Paul A.M. Bune 22 Oct 2008 09:56:27
recursive Paul A.M. Bune 22 Oct 2008 09:56:27

Contact us at files@mathworks.com