Asked by ouss ben
on 1 Feb 2012

I get this message everytime i open matlab

Warning: C:\Program Files\MATLAB\R2011b\toolbox\local\pathdef.m not found. Toolbox Path Cache is not being used. Type 'help toolbox_path_cache' for more info Undefined function or variable 'ispc'. Warning: MATLAB did not appear to successfully set the search path. To recover for this session of MATLAB, type "restoredefaultpath;matlabrc". To find out how to avoid this warning the next time you start MATLAB, type "docsearch problem path" after recovering for this session. Warning: Duplicate directory name: C:\Program Files\MATLAB\R2011b\toolbox\local. Warning: Initializing Handle Graphics failed in matlabrc. This indicates a potentially serious problem in your MATLAB setup, which should be resolved as soon as possible. Error detected was: MATLAB:undefinedVarOrClass Undefined variable "graphics" or class "graphics.internal.initializeMATLABRoot". Warning: Initializing Java preferences failed in matlabrc. This indicates a potentially serious problem in your MATLAB setup, which should be resolved as soon as possible. Error detected was: MATLAB:UndefinedFunction Undefined function 'usejava' for input arguments of type 'char'. > In matlabrc at 113 Warning: Failed to add default profiler filters. > In matlabrc at 161

How can i resolve this problem

*No products are associated with this question.*

Answer by Gareth
on 16 Feb 2012

Accepted answer

I've just put a clean install of 2011b onto a newly rebuilt Win7 machine and had the same problem. The issue appears to be that the pathdef.m file is absent, rather than corrupt or mis-located.

Having performed the "restoredefaultpath;matlabrc" fix mentioned above I then navigated to the C:\Program Files\MATLAB\R2011b\toolbox\local folder and typed "savepath pathdef.m". The system now appears to be working normally.

Jason Atwood
on 16 Sep 2012

Answer by Jason Ross
on 2 Feb 2012

Did you do what it tells you to do in the message?

"To recover for this session of MATLAB, type "restoredefaultpath;matlabrc". To find out how to avoid this warning the next time you start MATLAB, type "docsearch problem path" after recovering for this session."

You basically need to get the path into a decent shape (using restoredefaultpath) and then figure out how it got there and fix it (using the doc reference provided)

Image Analyst
on 6 Feb 2012

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn moreOpportunities for recent engineering grads.

Apply Today
## 0 Comments