Search code examples
matlabwebots

'Undefined variable “matlab” or class “matlab.addons.installedAddons”' when running launch.m in MATLAB


I want to control a robot using MATLAB in Webots 2019a. When I start the simulation using launch.m, it always fails. The information of the error is: Undefined variable "matlab" or class "matlab.addons.installedAddons" How can I solve this problem? Is it because I'm using the wrong MATLAB version? My MATLAB version is 2016b.


Solution

  • I suppose you are on Windows, right? In that case, you probably need to install the 'MATLAB MinGW-w64 C/C++ Compiler' addon as explained here: https://cyberbotics.com/doc/guide/using-matlab#matlab-installation