MATLAB: Error opening up file or changing paths

errorfileMATLABpath

Whenever I try to open a file I get:
error: input character is not valid in matlab 
Trying to change path or use "restoredefaultpath" leads to:
error: attempt to execute a script builtin as a function <C:\Program Files\MATLAB\R2011b\toolbox\compiler\mcr\matlab\…
 

Best Answer

Restart MATLAB
Determine your root path by executing:
>> matlabroot
Navigate to the file:
<matlabroot>\toolbox\local\restoredefaultpath.m
Run the file and then execute:
>> rehash toolboxcache
If opening files now works, execute:
>> savepath
Note: This will remove any custom paths you may have created. If desired, please see the following link for how to back them up: