Undefined variable "rtw"

1 view (last 30 days)
Nestor Garcia
Nestor Garcia on 29 Mar 2017
Commented: Nestor Garcia on 4 Apr 2017
Hi,
I have a simulink model, with customized blocks. When I try to build them, I got the following error:
Undefined variable "rtw" or class "rtw.pil.ExecutionProfileRegistry.getRegistryForModel"
I followed this thread https://www.mathworks.com/matlabcentral/answers/178715-code-generation-error-during-building , but it did not work for me. If I restored the default path, my simulink libraries are not included and my blocks do not appear, so that is not useful.
Could you please help me out?
I am using Matlab 2011b 32 bit for windows 7 (64 bit).

Accepted Answer

Astarag Chattopadhyay
Astarag Chattopadhyay on 4 Apr 2017
These errors may be arising due to either incomplete installation or the toolbox path not set correctly.
To confirm if the installation is complete, check if the folder TargetRegistry exists. Execute the following command:
>>ls(fullfile(matlabroot,'toolbox','coder','foundation','+RTW','@TargetRegistry'))
This should throw an error if a particular file or folder does not exist.
If you get an error, then there might have been installation problem. In this case, uninstall MATLAB Coder and reinstall it.
  1 Comment
Nestor Garcia
Nestor Garcia on 4 Apr 2017
Hi, yes my installation was not completed. I missed simulink coder; after install it manually it worked.
Thanks for your time.

Sign in to comment.

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!