MATLAB: Undefined variable “RTW” error on Matlab start before prompt appears and in coder

coder errorsMATLABmatlab coderundefined variable rtw

I have just installed Matlab R13a + Matlab coder + Financial/Statistics/Optimization/parallel toolboxes. On Matlab start I get message in the command window before the prompt appears:
Undefined variable "RTW" or class "RTW.TargetRegistry.getInstance".
Error in C:\Program Files\MATLAB\R2013a\toolbox\coder\foundation\build\+coder\+make\+internal\+guicallback\getToolchains.p>getToolchains (line 8)
Error in C:\Program Files\MATLAB\R2013a\toolbox\coder\coder\emlcprivate.p>emlcprivate (line 16)
The same error appears on attempt to use Matlab Coder
Please let me know what can I do to fix this

Best Answer

It seems like the file getInstance.p is not in your installation. What is the output of:
ls(fullfile(matlabroot,'toolbox','coder','foundation','+RTW','@TargetRegistry'))
that is where getInstance.p should be located. If it is there you should run:
rehash toolboxcache
restoredefaultpath
to see if that allows it to be picked up.
Related Question