Warning while opening matlab R2018b

6 views (last 30 days)
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...

Accepted Answer

Guillaume
Guillaume on 11 Feb 2019
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.
  5 Comments
isabelle oliveira
isabelle oliveira on 1 Apr 2020
I have the same problem, what I have to do to fix it?
Guillaume
Guillaume on 2 Apr 2020
Exactly what I said above. Run the which commands to find where the rogue assert.m and isvector.m are located and get rid of them... and complain to whomever decided that it was a good idea to call their file assert.m.

Sign in to comment.

More Answers (1)

Kenneth Davis
Kenneth Davis on 13 Aug 2020
Edited: Kenneth Davis on 13 Aug 2020
In defense of authors of code with functions overlapping built-in functions... some of us wrote code before such functions were built into MATLAB.

Categories

Find more on Manage Products in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!