Workspace sorting order of new desktop
15 views (last 30 days)
Show older comments
Hello. Lately I've been trying the new feature "new desktop" for version 2024a which introduced the dark theme. I am really enjoying it, however I am going through an issue which is quite critical for my work.
With earlier versions, sorting variables in the workspace always prioritized alphabetical order, sorting by the first letter of the variable name regardless if it was uppercase or lower (e.g. the variables were sorted as a... - A... - b... - B...).
In the "new desktop" mode (not sure if it's actually introduced entirely in 2024a [edit: I checked this and it does not happen in standard 2024a]), the sorting appears to be different, prioritizing the capitalized letter and only after sorting by the lowercase letters (so A... - B... - a... - b...).
This is actually a huge dealbreaker for me, as my work is strongly related to the old feature and I cannot simply adapt to it. I tried to look into the preferences but I couldn't manage to find an option to bring back the legacy feature. Is there a way to go back to the previous workspace sorting order? It would be a shame to downgrade to the previous Matlab release since I'm enjoying the new one, but I'll be forced to do it if I can't solve this issue. Thank you.
3 Comments
Adam Danz
on 29 May 2024
Thanks for the clear description, @Enrico Polo! Sounds like a reasonable workflow that would be impacted by this change.
Answers (2)
Nanda Gupta
on 31 May 2024
Moved: Adam Danz
on 31 May 2024
Thank you for sharing your feedback and raising this question. We're truly sorry for any inconvenience the changes in variables sorting in the workspace have caused. We appreciate the feedback we've received, especially from our new desktop users, and understand the importance of this legacy behavior. With that in mind, we're actively working to reintroduce this feature in the upcoming R2025a release.
Additionally, we're trying our best to bring it back to R2024b, provided we can do so without impacting performance. Your patience and feedback are invaluable to us as we strive to enhance your MATLAB experience.
2 Comments
Nanda Gupta
on 11 Jun 2024
Thank you for the feedback again, I have shared this with the relevant developers, and they will be assessing this use case for a future version of the set of Desktop capabilities.
Mathieu NOE
on 29 May 2024
hello
maybe a stupid idea but , if that solves the problem until you find a better solution, why not ?
I first thought that I would be able to solve the problem with orderfields , but finally nope.
I tried to put something togeter using the natsort (excellent) Fex submission : Natural-Order Filename Sort - File Exchange - MATLAB Central (mathworks.com)
in my command window , the result of my little demo is :
out2 = 8×3 cell array
{'Variable'} {'Size' } {'Bytes'}
{'a' } {'1 1' } {'8' }
{'A' } {'1 6' } {'48' }
{'b' } {'1 1' } {'8' }
{'B' } {'16 1'} {'128' }
{'m' } {'1 3' } {'24' }
{'z' } {'1 1' } {'8' }
{'Z' } {'1 1' } {'8' }
a = 1;
A = 10:2:20;
b = 2;
B = (20:1:35)';
m = 3:5;
Z = 7;
z = 7.7;
%% main code
w = whos;
m = numel(w);
% extract variable name ,size , bytes from structure
for k = 1:m
wn{k} = w(k).name;
wsize{k} = num2str(w(k).size);
wbytes{k} = num2str(w(k).bytes);
end
% use natsort with descend order
[B,ndx,dbg] = natsort(wn, [], 'descend');
out = [B' wsize'];
% then reverse the order
ndx_rev = ndx(end:-1:1);
header = {'Variable','Size','Bytes'};
% display in the command window
out2 = [header; [wn(ndx_rev)' wsize(ndx_rev)' wbytes(ndx_rev)']]
3 Comments
Mathieu NOE
on 10 Jul 2024
ok I understand your point
let see if TMW will provide you the good answer ...
See Also
Categories
Find more on Install Products in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!