MATLAB: Do I get an undefined function ‘rmiml.getAll’ error when I dock the editor and try to execute a script in MATLAB(R2013b)

MATLAB

I am trying to execute a script and I am docking the editor. I get the following error message:
 
Undefined function 'rmiml.getAll' for input arguments of type 'char'.
Undefined function 'rmiml.visibleInToolstrip' for input arguments of type
'char'.
Undefined function 'rmiml.visibleInToolstrip' for input arguments of
type 'char'.
java.lang.NullPointerException
at
com.mathworks.toolbox.simulink.slvnv.RmiEditorToolstripContributor$4$1.runOnAWTEventDispatchThread(RmiEditorToolstripContributor.java:173)
at com.mathworks.jmi.MatlabWorker$1.run(MatlabWorker.java:67)
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)
java.lang.NullPointerException
at
com.mathworks.toolbox.simulink.slvnv.RmiEditorToolstripContributor$4$1.runOnAWTEventDispatchThread(RmiEditorToolstripContributor.java:173)
at com.mathworks.jmi.MatlabWorker$1.run(MatlabWorker.java:67)
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)

Best Answer

If you have two versions of MATLAB, type out the following at the command window:
>> which pathdef.m -all
The ‘pathdef.m’ that is currently used must be the one pertaining to the R2013b. If an older ‘pathdef.m’ exists, it will shadow the new one and does not add the following directory to the path, which results in the error.
Renaming the old ‘pathdef.m’ should fix the error.
Related Question