Setting initial working folder in linux
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Yashas Lakshminarasimhaiah Rajendra
am 3 Jul. 2024
Kommentiert: Yashas Lakshminarasimhaiah Rajendra
am 3 Jul. 2024
Hi there,
I have been trying to setup MATLAB on a linux system and this is my first time working with linux and MATLAB. I have secondary drive that is set to automount at boot and would like to relocate my working directory to that location. I did everthing that MATLAB recommends from setting it up as the initial working directory under general setting and adding it to the MATLAB search path, but to no avail.
Is there a workaround to this issue?
0 Kommentare
Akzeptierte Antwort
Dinesh
am 3 Jul. 2024
Hello Yashas.
As of version R2024a, the default setting is in such a way that your previous working directory will be opened.
If using the "Initial working folder" option to specify the folder path in "General" section of the "Preferences" dialog doesn't help you open a specific directory every time you open MATLAB, then here's a potential workaround:
You can make use of the "startup.m" file in MATLAB that executes every time MATLAB is opened. You can edit this file to add a new command to change the working directory on startup.
cd('<absolute_path_to_your_working_directory>');
Here's the documentation link that will help you to edit the "startup.m" file: https://www.mathworks.com/help/matlab/ref/startup.html
1 Kommentar
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Startup and Shutdown 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!