MATLAB: Am I unable to change the MATLAB current directory to a directory that exists

cdchangedirectoryMATLABrecognize

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.

Best Answer

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.