The "current folder history" stores paths to directories that were once current (it differs from the search path). When paths from networks end up on the current folder history and the network becomes unavailable, an undefined variable or function (often caused by a typo) may cause an unbearable delay in the error message to appear [1,2,3]. To alleviate this problem, this function produces a GUI that will list all paths on the current folder history and you can select which paths to remove from the history. The GUI will create a backup of your original history in case you want to restore it.
This has been developed in Matlab r2017b and does not work with previous releases but the problem did not occur prior to then anyway. This works with PC (I'd love for a collaborator to adapt this to Mac and become a co-author).
For discussion on this topic, see the link in reference #2.
[1] https://www.mathworks.com/matlabcentral/answers/395876-undefined-function-error-is-very-slow-to-occur
[2] https://www.mathworks.com/matlabcentral/answers/364153-40-seconds-waiting-for-undefined-function-or-variable-error-2017b
[3] https://www.mathworks.com/matlabcentral/answers/412972-matlab-218a-stalls-on-undefined-variables
Adam Danz (2021). removeDrivesFromHistory (https://www.mathworks.com/matlabcentral/fileexchange/72519-removedrivesfromhistory), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Create scripts with code, output, and formatted text in a single executable document.
Took me forever to figure out why MATLAB was getting hung up and once I did, I was able to fix it quickly with this. Saved me from a major headache!
You are fixing Matlab's problems for them! Thank you.
Thank you so much, I was losing so much time to this issue!
Thank you!!!!!!
Solved my problem!!
Thanks! Your code tremendously reduced the amount of delay! I also use Mac, and it does not have this problem at all.