Borrar filtros
Borrar filtros

Setting initial working folder in linux

15 visualizaciones (últimos 30 días)
Yashas Lakshminarasimhaiah Rajendra
Yashas Lakshminarasimhaiah Rajendra el 3 de Jul. de 2024 a las 4:19
Comentada: Yashas Lakshminarasimhaiah Rajendra el 3 de Jul. de 2024 a las 4:45
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?

Respuesta aceptada

Dinesh
Dinesh el 3 de Jul. de 2024 a las 4:35
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

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Productos


Versión

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by