Effacer les filtres
Effacer les filtres

Why do I get an "undefined function" error and loss of command functionality when I start MATLAB?

1 vue (au cours des 30 derniers jours)
I receive the following error when starting MATLAB:
??? Undefined function or variable 'usejava'.
Error in ==> /matlab/toolbox/local/matlabrc.m
On line 24 ==> if usejava('Desktop')
After that, when I try to use any MATLAB commands, I receive further errors.

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 14 Fév 2012
This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
This issue is due to a corrupt pathdef.m file, which contains a list of the directories in the MATLAB search path.
To resolve this issue, see the following:
If you are using MATLAB 7.0 (R14), type the following commands:
restoredefaultpath ; matlabrc
If this command resolves the issue, type the following command to save the current path for all future sessions of MATLAB:
savepath
If you are using versions of MATLAB prior to MATLAB 7.0 (R14), follow the appropriate instructions below:
For Windows Installations
Start MATLAB, and enter the following commands:
matlabpath(char(com.mathworks.jmi.MatlabPath.getDefaultPath))
path2rc(fullfile(matlabroot,'toolbox','local','pathdef.m'))
This will regenerate your pathdef.m file.
If you still have problems, send a copy of your pathdef.m file from $MATLAB/toolbox/local/ to support@mathworks.com and mention Solution 1-1AVEG in the subject field.

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by