MATLAB: How to get past cd error on starting GUIDE

guideMATLAB

Frustration! All the posts I can find on GUIDE start by selecting from GUIDE Quick Start/Create New GUI. But when I select “Blank GUI (Default) I get the following error:
Error using cd Cannot CD to C:\Users\fackerman\AppData\Local\Temp;c:\Program Files\Java\jdk1.6.0_21\bin (Directory access failure).
Error in tempdir (line 30) curr_dir = cd(tmp_dir);
Error in tempname (line 17) dirname = tempdir;
Error in guidetemplate/processDialogResult (line 159) temp = tempname;
Error in guidetemplate/dialogCallback (line 103) processDialogResult(quickstartpanel);
Warning: Error occurred while evaluating listener callback.
From cmd I can cd to both of these directories. What’s the problem? How do I fix it?

Best Answer

It looks like the TEMPDIR function is not returning a single directory name, but two.
Have you created your own TEMPDIR function that is shadowing the one included with MATLAB? If so, rename it.
Have you defined either of the environment variables TEMP or TMP? If so, undefine them, restart MATLAB (cleaning TEMPDIR may work, but better to make sure all of MATLAB recognizes the changes) and try again.
Related Question