フィルターのクリア

How can I change which pathdef.m is loaded each startup?

40 ビュー (過去 30 日間)
Oliver Mayer
Oliver Mayer 2022 年 10 月 29 日
回答済み: Steven Lord 2022 年 10 月 29 日
Hello,
I have a newly installed MATLAB R2022b on Ubuntu 22.04 LTS. Unfortunately, two pathdef.m were saved in a directory that is readonly (toolbox/local and toolbox/local/template both in the MATLAB directory). When I try changing the permissions, I cannot because I "am not the owner, so [I] cannot change these permissions" of both the files.
I have created a new pathdef.m in my Documents/MATLAB directory. How can I get MATLAB to always use this pathdef.m file and NOT the ones that are saved in the programm directory?

回答 (1 件)

Steven Lord
Steven Lord 2022 年 10 月 29 日
If you look inside the pathdef.m file you will see a comment that starts "DO NOT MODIFY THIS FILE."
Rather than creating your own pathdef.m, if you want to modify the saved path I recommend you use the Set Path icon in the Environment section of the Home tab of the toolstrip. If you want to modify it programmatically use path, genpath, addpath, rmpath, and savepath. If the path becomes corrupted or no longer allows you to call those functions, use restoredefaultpath.

カテゴリ

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

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by