Live script change context to current directory (same behavior as normal m files)
Show older comments
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.
Accepted Answer
More Answers (0)
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!