Why does ADDPATH not allow me to add a directory with a space in it in MATLAB 7.7 (R2008b)?

11 Ansichten (letzte 30 Tage)
When I try to add a directory with a space in it using the ADDPATH command:
addpath C:\Program Files\
I get the following warning:
Warning: Name is nonexistent or not a directory: C:\Program.
It seems that ADDPATH does not like the space in the directory name.

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 27 Jun. 2009
When using the command syntax of ADDPATH, spaces between string inputs are interpreted as separators between arguments. To ensure that ADDPATH interprets the directory as a single argument, use the function syntax with parenthesis and single quotes around the directory name. For example:
addpath('C:\Program Files')

Weitere Antworten (0)

Kategorien

Mehr zu Search Path finden Sie in Help Center und File Exchange

Produkte


Version

R2008b

Community Treasure Hunt

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

Start Hunting!

Translated by