MATLAB: Warning while opening matlab R2018b

asyncio.channel/isopen errorlegendMATLAB

Opening Matlab I find this Warning, which seems to deal with my laptop, but what?
Since I got this, it became impossible to use some fuctionalities, for example legends in the plot.
Does someone has some good advice to fix it?
I'll attach the command window copy and paste (everything is printed in orange, exept the last line..)
Warning: Function assert has the same name as a MATLAB builtin. We suggest you
rename the function to avoid a potential name conflict.
Warning: Function isvector has the same name as a MATLAB builtin. We suggest
you rename the function to avoid a potential name conflict.
Warning: The following error was caught while executing 'asyncio.Channel' class
destructor:
Error using assert
Too many input arguments.
Error in asyncio.Channel/isOpen (line 202)
assert( isscalar(obj), 'Channel:isOpen:notScalar',...
Error in asyncio.Channel/delete (line 167)
if isOpen(obj)
Error in asyncio.Channel (line 45)
function obj = Channel(devicePluginPath, converterPluginPath, ...
Error in internal.hotplug.EventSource (line 40)
obj.Channel = asyncio.Channel(fullfile(pluginDir,
'hotplugdevice'),...
Error in internal.deviceplugindetection.Manager (line 173)
obj.USBDetectorObject = internal.hotplug.EventSource();
Error in internal.deviceplugindetection.Manager.getInstance (line 246)
devicePluginManagerInstance =
internal.deviceplugindetection.Manager();
Error in matlabrc (line 86)
pl = internal.deviceplugindetection.Manager.getInstance();
> In asyncio.Channel (line 45)
In internal.hotplug.EventSource (line 40)
In internal.deviceplugindetection.Manager (line 173)
In internal.deviceplugindetection.Manager.getInstance (line 246)
In matlabrc (line 86)
Warning: The following error was caught while executing
'internal.hotplug.EventSource' class destructor:
Dot indexing is not supported for variables of this type.
Error in internal.hotplug.EventSource/stop (line 69)
obj.Channel.close();
Error in internal.hotplug.EventSource/delete (line 53)
stop(obj);
Error in internal.hotplug.EventSource (line 34)
function obj = EventSource()
Error in internal.deviceplugindetection.Manager (line 173)
obj.USBDetectorObject = internal.hotplug.EventSource();
Error in internal.deviceplugindetection.Manager.getInstance (line 246)
devicePluginManagerInstance =
internal.deviceplugindetection.Manager();
Error in matlabrc (line 86)
pl = internal.deviceplugindetection.Manager.getInstance();
> In internal.hotplug.EventSource (line 34)
In internal.deviceplugindetection.Manager (line 173)
In internal.deviceplugindetection.Manager.getInstance (line 246)
In matlabrc (line 86)
executing gpml startup script...

Best Answer

The most important part of the error is probably:
Warning: Function assert has the same name as a MATLAB builtin. We suggest you
rename the function to avoid a potential name conflict.
Warning: Function isvector has the same name as a MATLAB builtin. We suggest
you rename the function to avoid a potential name conflict.
It sounds like you have somewhere on your matlab path your own assert.m and isvector.m which override the corresponding built-in functions. It's a particularly bad idea to override both and in your particular case, your assert.m takes less inputs than the built-in one, hence why you get
Error using assert
Too many input arguments.
Get rid of, or rename the offending functions and don't use the names of critical built-in functions for your own.
If you don't know where these overrides are:
which assert -all
which isvector -all
anything that is not in matlab toolbox folder probably shouldn't be there.
Related Question