Re: File not located on MATLAB 'path' but correct path is known by MATLAB

Posted by randress on
URL: http://forum.featool.com/File-not-located-on-MATLAB-path-but-correct-path-is-known-by-MATLAB-tp1037p1042.html

[I realize that this really belongs on some MATLAB forum, but I thought I would go ahead and finish this since I started it.]

Below is some further information I sent to MATLAB
<< Further notes sent to MATLAB:
 
I have done some further testing and it seems that MATLAB is maintaining a path list separate from the execution “path” (the one manipulated by addpath | pathtool | rehash | restoredefaultpath | rmpath). This path, I will call “auxpath”, is a set of directory locations through which MATLAB searches for executable commands or scripts when that command is not found in the current working directory or on the “path”. If located, MATLAB does not execute the command but instead responds with the suggestion that it was located and in order to execute the command the user could ‘cd’ or ‘setpath’ using the hyperlinked commands.
 
Evidently, this list starts out empty with a fresh installation of MATLAB.  When a command or script is successfully executed, having been found in the current working directory or on the “path”, the directory in which the command was found is added to this “auxpath”.  The cumulative “auxpath” is maintained intact when MATLAB is exited and restarted.
 
If this is true – such a list as I have described as “auxpath” – how can this list be displayed, cleared, or modified? Is it described in the documentation?
---- end further notes to MATLAB>>

Here is what I received back from MATLAB:
<< Begin message from MATLAB ====
I have some updates to share regarding your Technical Support Case #04799372 regarding 'Gratuitous Path Location'.

The history used by the feature in question is the Current Folder History. It is the list that you see if you click the down arrow all the way on the right of the bar showing the current folder.

This list is also available in settings.
To access the settings object, you can execute the following command:
s = settings().matlab.desktop.currentfolder.History
To view the current value, you can access the "ActiveValue" property of the setting:
s.ActiveValue
You can also modify the value for either just the current MATLAB session, or across MATLAB sessions, by setting the "TemporaryValue" or "PersonalValue" property of the setting, respectively.

For additional information about "Setting" objects, please refer to the following documentation:
https://www.mathworks.com/help/matlab/ref/matlab.settings.setting.html

I agree that this particular setting is not documented, so I have communicated this to the corresponding development and documentation team.

======= End message from MATLAB>>

This current working directory history is located just as the above message says (It seems to be limited to 20 entries.):
>> s= settings().matlab.desktop.currentfolder.History;
>> fprintf ("%s\n",s.ActiveValue{1:length(s.ActiveValue)})
D:\FEATool\tempwork
D:
D:\FEATool
D:\FEATool\tempwork\calling c
D:\FEATool\tempwork\Morse\Current Density at 1 meter\TableII Series\Zone of Danger
D:\FEATool\tempwork\Morse\Current Density at 1 meter\TableII Series\Zone of Danger\Total Current
D:\FEATool\tempwork\Morse\Current Density at 1 meter\TableII Series
D:\FEATool\tempwork\Morse\Current Density at 1 meter\TableII Series\CurrentDensity
D:\FEATool\tempwork\Morse\Current Density at 1 meter
D:\FEATool\tempwork\Morse
C:\Users\Randal\Documents\MATLAB\Examples\R2020a\matlab\LiveEditorInteractiveNarrative
C:\Users\Randal\AppData\Roaming\MathWorks\MATLAB\R2020a
D:\FEATool\tempwork\scripts
D:\FEATool\tempwork\Morse\Current Density at 1 meter\report
C:\Users\Randal\Documents\MATLAB\Examples\R2020a\matlab\ReturnControlToInvokingFunctionExample
C:\Users\Randal\AppData\Roaming\MathWorks\MATLAB Add-Ons\Apps\FEAToolMultiphysics
C:\Users\Randal\Desktop\FEATool betas\featool-v1p13-beta4c
C:\Users\Randal\Desktop\FEATool betas\featool-v1p13-beta4
C:\Users\Randal\Desktop\FEATool betas
C:\Users\Randal\Desktop\reports-1.13beta3

However I was not able to see what I expected when I "click the down arrow all the way on the right of the bar showing the current folder" as MATLAB suggested. I have inquired about this. I may have simply misunderstood what I was supposed to see.

Kind regards,
Randal