How can I change which pathdef.m is loaded each startup?
조회 수: 34 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
답변 (1개)
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.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!