Update Path Externally

1 次查看(过去 30 天)
Cesare
Cesare 2011-4-13
Is there a way to add a folder to the Matlab Path without opening Matlab? E.g. if I want to create an installer for a new toolbox so that the user does not have to manually modify the path. Thanks in advance, Cesare

回答(3 个)

Fangjun Jiang
Fangjun Jiang 2011-4-13
edit pathdef.m

Kaustubha Govind
Kaustubha Govind 2011-4-21
If you don't mind MATLAB performing this operation silently, you could use the following system command (MATLAB must be on path):
matlab -nodisplay -nosplash -r "addpath('/path/to/add'); savepath; quit;"
For Windows, see Solution#1-16B8X

Cesare
Cesare 2011-4-19
I was a bit scared of the big warning telling not to edit it.

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by