How to fix MATLAB errors arise from changing the search path?

6 vues (au cours des 30 derniers jours)
phdcomputer Eng
phdcomputer Eng le 19 Juin 2019
Commenté : Rik le 19 Juin 2019
The Matlab software installed on my computer(windows OS) shows a lot of errors when I tried to change the search path by using addpath command , suddenly MATLAB shows errors even for the startup and doesn't recognize any functions or variables or any commands
I usually saved my projects in C:\Program Files\MATLAB\R2016a\bin and when I tried to change the search path to C:\Users\Bita\Documents\MATLAB by using
addpath('newpath')
and also usnig
mypath=fullfile(userpath,'foldername')
addpath(mypath)
and then MATLAB is showing iterative errors while I'm not running any programs, even for MATLAB startup ,It shows a lot of errors
The errors are:
Undefined function or variable 'matlabrc'.
Undefined function or variable 'which'.
Undefined function or variable 'rmiml.getAll'.
Undefined function or variable 'fschange'.
Undefined function or variable
'internal.matlab.desktop.editor.isSystemObjectFile'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.getAll'.
Undefined function or variable 'fschange'.
Undefined function or variable
'internal.matlab.desktop.editor.isSystemObjectFile'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.getAll'.
Undefined function or variable 'fschange'.
Undefined function or variable
'internal.matlab.desktop.editor.isSystemObjectFile'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.getAll'.
Undefined function or variable 'fschange'.
Undefined function or variable
'internal.matlab.desktop.editor.isSystemObjectFile'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.getAll'.
Undefined function or variable 'fschange'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable
'internal.matlab.desktop.editor.isSystemObjectFile'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.getAll'.
Undefined function or variable 'fschange'.
Undefined function or variable
'internal.matlab.desktop.editor.isSystemObjectFile'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.getAll'.
Undefined function or variable 'fschange'.
Undefined function or variable
'internal.matlab.desktop.editor.isSystemObjectFile'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.getAll'.
Undefined function or variable 'fschange'.
Undefined function or variable
'internal.matlab.desktop.editor.isSystemObjectFile'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.getAll'.
Undefined function or variable 'fschange'.
Undefined function or variable
'internal.matlab.desktop.editor.isSystemObjectFile'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.getAll'.
Undefined function or variable 'fschange'.
Undefined function or variable
'internal.matlab.desktop.editor.isSystemObjectFile'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.getAll'.
Undefined function or variable 'fschange'.
Undefined function or variable
'internal.matlab.desktop.editor.isSystemObjectFile'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.getAll'.
Undefined function or variable 'fschange'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable
'internal.matlab.desktop.editor.isSystemObjectFile'.
Undefined function or variable 'rmiml.getAll'.
Undefined function or variable 'fschange'.
Undefined function or variable
'internal.matlab.desktop.editor.isSystemObjectFile'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable 'rmiml.getAll'.
Undefined function or variable 'fschange'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Undefined function or variable
'internal.matlab.desktop.editor.isSystemObjectFile'.
Undefined function or variable 'rmiml.visibleInToolstrip'.
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.mathworks.mlwidgets.graphics.ModelStateFactory.createNoSelectionModelState(ModelStateFactory.java:251)
at com.mathworks.mlwidgets.graphics.PlotToolSetFactory$3.parseComplete(PlotToolSetFactory.java:123)
at com.mathworks.mlwidgets.graphics.ModelStateFactory$ProductInfoListener$1$1.run(ModelStateFactory.java:1032)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
I'll be very grateful to have your opinions about how to fix MATLAB software
Thanks
  5 commentaires
phdcomputer Eng
phdcomputer Eng le 19 Juin 2019
Thanks
But I don't have AppData folder in this path
phdcomputer Eng
phdcomputer Eng le 19 Juin 2019
from Home Menue , Environment Tab , set path , just shows error preferences part in General , initial working folder, I tested the working folder from previous MATLAB sessions , also I tried specify the full path :C:\Program Files\MATLAB\R2016a\bin
but It doesn't have any resault.

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 19 Juin 2019
"I usually saved my projects in C:\Program Files\MATLAB\R2016a\bin"
You have corrupted MATLAB . You need to move your projects somewhere else for the moment, then uninstall MATLAB and reinstall it. Then after that, you need to never save your MATLAB files underneath C:\Program Files
  3 commentaires
Stephen23
Stephen23 le 19 Juin 2019
Modifié(e) : Stephen23 le 19 Juin 2019
"...the default path which was in the MATLAB installation path"
The very first folder on the default search path is the userpath folder, which is located in their personal documents folder. This is clearly explained in the documentation:
"The MATLAB userpath folder, which is added to the search path at startup, and is the default location for storing user files"
Note that it also clearly describes where users should store their files! For me, this is the first folder listed on the default Search Path:
C:\Users\stephen.cobeldick\Documents\MATLAB
and this is the same folder that is returned by userpath, exactly as the documentation states. The path you showed is NOT on the default MATLAB Search Path:
C:\Program Files\MATLAB\R2016a\bin % NOT default Search Path!
So you must have made the change yourself, or some third-party tool made that change, or you are confusing the MATLAB Search Path with something else (e.g. the Windows System Path, which quite possibly will include the MATLAB installation folder).
"how can I be sure that MATLAB doesn't save projects in the same path and this problem won't happen again?"
It doesn't happen by default, so you shouldn't need to do anything.
Rik
Rik le 19 Juin 2019
I second the suggestion of reinstalling Matlab. Currently your errors might be caused by your corrupted installation, or a bug in your code. There is not really an easy way for you to tell which error is caused by which problem.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

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

Community Treasure Hunt

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

Start Hunting!

Translated by