Live script change context to current directory (same behavior as normal m files)
显示 更早的评论
Hi, is there any way to configure MATLAB so live scripts change to current directory when they are executed ? I am looking for the same behavior as .m file which ask to change the directory when they are executed.
Right now, I have to add some code to do that (see https://www.mathworks.com/matlabcentral/answers/416718-automatically-add-an-opened-live-script-s-directory-to-the-search-path-for-the-current-session)
Basically, the reason to change context is to be able to load some data files which are in the same dir as the mlx script. I want to use a relative path and don't want to use an absolute path.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!