Why am I unable to change the MATLAB current directory to a directory that exists?

9 views (last 30 days)
Why am I unable to change the MATLAB current directory to a directory that exists?
From the Unix prompt, I can change directories to a specific directory with no problems. But when I try this in MATLAB, I receive an error:
cd /myDriveThatExists
??? Error using ==> CD
Name is nonexistent or not a directory.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
The problem is that MATLAB AUTOMOUNT_MAP environment variable is set incorrectly. This occurs during installation when the MATLAB root path given to the installer is different from what the UNIX PWD command returned for that path at the time of installation. Because of this, MATLAB concluded that an automount mount directory was being used, and transformed all paths inside MATLAB to the PWD path mentioned above.
The easiest way to see the AUTOMOUNT_MAP value is by running the MATLAB command with the -n option,
% matlab -n
You may be able to learn more about your setup if you use the following UNIX command, which reports file system disk space usage
% df -k
To resolve this problem, you must reinstall MATLAB. When telling the installer what the MATLAB root path is, be sure to use the path returned by the UNIX PWD command.

More Answers (0)

Categories

Find more on Startup and Shutdown in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!