Sorting variable names in alphabetical order
13 views (last 30 days)
Show older comments
Jonny Coltraine
on 20 Nov 2012
Commented: Walter Roberson
on 6 Jan 2016
Using the workspace window, wow can I sort variables defined inside a struct object in alphabetical order? clicking on the Field column doesn't sort them.
0 Comments
Accepted Answer
More Answers (1)
Daniel Shub
on 20 Nov 2012
Assuming you mean the variable editor and not the workspace window, I think this is a possible bug. There seems to me no good reason to have the ability to sort by field, and not have it perform an alphabetical sort.
2 Comments
Walter Roberson
on 6 Jan 2016
MATLAB structs are field order dependent.
A = struct('field1', [], 'field2', []);
B = struct('field2', [], 'field1', []);
A(2) = B;
Subscripted assignment between dissimilar structures.
However, [A;B] is fine
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!