MATLAB: Do I get the error “Unable to create the preferences folder – Preferences folder location must be a valid full path” when trying to start MATLAB

MATLAB

When trying to start MATLAB, why do I get "Error Starting MATLAB – Unable to create preferences folder in "%PATH%". Preferences folder location must be a valid full path."?

Best Answer

This error occurs when the preferences directory is not in a valid path. This could also occur if the MATLAB_PREF environment variable is not an absolute path.
To resolve this, make sure your path is absolute. This means no spaces, special characters, or quotations.
Examples that won't work:
C:/Program Files/MATLABPref
"C:/MATLABPref"
C:/MãTLABPref