Why does ADDPATH not allow me to add a directory with a space in it in MATLAB 7.7 (R2008b)?
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
Réponse acceptée
MathWorks Support Team
le 27 Juin 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')
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Search Path dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!