Filter löschen
Filter löschen

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

40 Ansichten (letzte 30 Tage)
Oliver Mayer
Oliver Mayer am 29 Okt. 2022
Beantwortet: Steven Lord am 29 Okt. 2022
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?

Antworten (1)

Steven Lord
Steven Lord am 29 Okt. 2022
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.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by