MATLAB: Error with CD command

cd

Error using cd Cannot CD to C:\Users\gnani\AppData\Local\Temp (Name is nonexistent or not a directory).
Error in tempdir (line 31) curr_dir = cd(tmp_dir);
Error in publish (line 128) imageDir = tempdir;
Error in mdbpublish (line 56) outputPath = publish(file, options);
Error using open (line 69) NAME must contain a single string.

Best Answer

temp file in the C DIRECTORY of the path must be given full access control by right clicking the folder. and going to security and give full access