Proper Treatment of Symbolically Linked Script in Editor
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a series of simulations from an external application which all require similar post-processing steps. I use a Linux system, and In order to avoid copy-pasting the same post-processing script around, I've created symbolic links to a single post-processing script from subdirectories where the simulations were run. My directory structure looks something like this:
postFiles/
postProcScript.m
runFiles/
run1/
simResults2Process.txt
post/
postProcScript.m <--- symbolic link to ../../../postFiles/postProcScript.m
run2/
simResults2Process.txt
post/
postProcScript.m <--- symbolic link to ../../../postFiles/postProcScript.m
[...]
runN/
simResults2Process.txt
post/
postProcScript.m <--- symbolic link to ../../../postFiles/postProcScript.m
If the current directory is one of the run/post/ directories, then I can run my symbolically linked postProcScript.m script from the command window. However when I open it in the editor, it does NOT open the symbolic link version, but rather it opens the version in postFiles/. This behavior is undesirable because when I click the run button from the editor or press F5, MATLAB says it can't run the script (in postFiles) because the name shadows the name of the script in the run/post directory.
I have been using Linux symbolic links with MATLAB files for years, and do not remember seeing this behavior in previous versions of MATLAB. I recently started using R2018b -- is there a setting I need to change in the new version which will allow me to edit and run a symbolically-linked script or function?
0 Kommentare
Antworten (1)
Steven Lord
am 17 Jan. 2020
Why not just add the directory containing the original preprocessing script file to the MATLAB search path? That will make it callable regardless of which directory is the current directory.
Siehe auch
Kategorien
Mehr zu Search Path finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!