Workspace sorting order of new desktop

16 views (last 30 days)
Enrico Polo
Enrico Polo on 28 May 2024
Commented: Mathieu NOE on 10 Jul 2024
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
Enrico Polo
Enrico Polo on 28 May 2024
@Adam Danz to put it simply: in my environment I have to reproduce realistic scenarios involving physical phenomena. Since it is implemented from scratch, I need to constantly check if the variables' value and/or size make sense or if something funny is going on with my code. I work with a high number of variables (can be over 100), and sometimes the first letter is capitalized and other times it isn't. Mostly, it can depend on the purpose of the variable, but sometimes it just happens. Therefore I need to quickly find the variable in the workspace to verify its value/size and this cannot happen if the workspace is sorted alphabetically discriminating between upper and lower case, since I don't instinctively remember the ones I capitalized. Searching in universal alphabetical order is far faster, that's why this sorting would impact my workflow so much.
Adam Danz
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.

Sign in to comment.

Answers (2)

Nanda Gupta
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
Enrico Polo
Enrico Polo on 3 Jun 2024
@Nanda Gupta thank you for your answer. I'm glad I could reach someone who's actively working on this feature. If I could add just one more feedback, I'm also encountering issues when opening the "Variables" tab from the workspace: the Variables tab can not be docked anymore next to the Editor tab to easily switch between the two. Instead, the variables are simply added together with the script files and cannot be opened separately. I believe that keeping script files and variables in separated tabs is the best way to work to avoid confusion and feeling of congestion.
New behavior:
Legacy behavior:
I would greatly appreciate if together with the previous request you could also add back this feature, which incredibly improves the ide organization. Thank you again.
Nanda Gupta
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.

Sign in to comment.


Mathieu NOE
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
Enrico Polo
Enrico Polo on 9 Jul 2024
Thank you for your answer, but this is not what I was looking for. I need a nearly instantaneous way to check the parameter value on the fly and access the variable directly from the workspace (it can be a matrix or a cell array), so the command window is not an option. Also it would probably still be faster to look for the variable in the workspace instead of running a function. Since this is an issue related to the workflow, I believe the best solution for now is going back to the previous desktop version, these legacy features are too important for me. Still, thank you for your time.
Mathieu NOE
Mathieu NOE on 10 Jul 2024
ok I understand your point
let see if TMW will provide you the good answer ...

Sign in to comment.

Categories

Find more on Install Products in Help Center and File Exchange

Products


Release

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!