Setting initial working folder in linux

12 ビュー (過去 30 日間)
Yashas Lakshminarasimhaiah Rajendra
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?

採用された回答

Dinesh
Dinesh 2024 年 7 月 3 日
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 件のコメント
Yashas Lakshminarasimhaiah Rajendra
Appreciate your help Dinesh.
Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by