MATLAB: Matlab 2016a does not install correctly – everything crashes with “Too many input arguments.”

2016ainstallationMATLABtoo many input argumentsunusable

Matlab R2016a does not install correctly on my Lenovo Yoga 900 Windows 10 laptop. (I recently installed 2016a on several different other machines and this problem did not arise on those.) On my laptop I tried to install many times with and without firewall, meticulous removal of previous versions, etc. The error is repeatable and nothing really works. This is what I get when Matlab 2016a starts:
Warning: Function size has the same name as a MATLAB builtin. We suggest you
rename the function to avoid a potential name conflict.
Warning: Initializing MATLAB Graphics failed.
This indicates a potentially serious problem in your MATLAB setup, which should
be resolved as soon as possible. Error detected was:
MATLAB:TooManyInputs
Too many input arguments.
> In hgrc (line 163)
In initprefs (line 11)
In matlabrc (line 113)
Warning: The following error was caught while executing 'internal.hotplug.EventSource' class
destructor:
Too many input arguments.
> In internal.deviceplugindetection.Manager (line 161)
In internal.deviceplugindetection.Manager.getInstance (line 258)
In matlabrc (line 137)
Warning: The following error was caught while executing 'asyncio.Channel' class destructor:
Too many input arguments.
> In internal.deviceplugindetection.Manager (line 161)
In internal.deviceplugindetection.Manager.getInstance (line 258)
In matlabrc (line 137)
Academic License
Error using connector.internal.autostart.run
Too many input arguments.
… and trivial functions do not work any more, crashing with "Too many input arguments."

Best Answer

It looks like you have a function called size.m somewhere on your MATLAB path. Search your computer for files called size.m and rename any file with this name except for the one in the MATLAB installation folder ($MATLABROOT\toolbox\matlab\elmat\size.m).