Is there a way to modify the path for ".." ( shortcut ) ?
6 次查看(过去 30 天)
显示 更早的评论
Greetings,
Whenever I download repositories from my team from other departments they have scripts which are runned from a path which contain ".." and I do not know how to change on my MATLAB workstation the parent path for it. For example:
MODEL_CONFIG='..\03_config\config.m';
run(MODEL_CONFIG)
On their workstation this code works but on my workstation it says that:
"there is no ..\03_config\config.m not found."
and I know that the ".." is the parent directory from the project. My question is:
"How can I change the default parent directory so that ".." can work on my workstation too?
0 个评论
回答(1 个)
Walter Roberson
2022-6-29
You can change the startup folder; see https://www.mathworks.com/help/matlab/matlab_env/matlab-startup-folder.html
The effect of this is that when you start MATLAB, MATLAB would automatically cd() to that directory.
I do not generally recommend this, except for the case where you have moved your hierarchy of MATLAB files to an unusual location.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Search Path 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!