Why do I receive a warning regarding missing pathdef.m when starting MATLAB 7.14 (R2012a)?

24 visualizaciones (últimos 30 días)
I just finished the MATLAB installation, but when starting MATLAB I receive the following warnings and cannot execute any command:
Warning: C:\Program Files\MATLAB\R2012a\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\R2012a\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 168

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 18 de Oct. de 2013
This issue was previously due to a bug that has been fixed in Release 2013a (R2013a). For previous product releases, read below for any possible workarounds:
In order for MATLAB to execute a command, the file that contains the code for that command must be stored in a folder that is on the MATLAB search path. The MATLAB search path is just a list of folders on your file system. Each time MATLAB launches, that list is repopulated with the help of the file "pathdef.m". These warnings occur because the file "pathdef.m" was not created during installation.
To resolve the issue, follow these steps:
1) Start MATLAB as an administrator.
2) In the MATLAB Desktop interface, locate the address field of the Current Folder browser, in which you can enter a path to change your current working directory.
3) Enter "$MATLABROOT\toolbox\local\" in the address field, where $MATLABROOT should be replaced with the location where MATLAB is installed. On Windows, this is typically in a folder such as:
C:\Program Files\MATLAB\R2012a
On Mac OS X, this is typically:
/Applications/MATLAB_R2012a.app
For example, if I am using MATLAB R2012a on Mac OS X, in the address bar, I would enter:
/Applications/MATLAB_R2012a.app/toolbox/local
4) At the MATLAB Command Window, execute the following commands:
restoredefaultpath;
matlabrc
savepath
These commands will cause a new file, "pathdef.m", to be created.
You should now be able to relaunch MATLAB without seeing those warning messages, and you should be able to execute commands at the MATLAB Command Window.
If the issue is not resolved, try creating the "pathdef.m" file on your desktop by replacing the "savepath" command above with a command such as:
savepath C:\Users\myusername\Desktop\pathdef.m
You can now manually copy that "pathdef.m" file from your desktop into $MATLABROOT\toolbox\local.

Más respuestas (0)

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Productos


Versión

R2012a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by