Warning while opening matlab R2018b

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...

 Risposta accettata

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 Commenti

Thanks so much! I didn't know the commads:
which assert -all
which isvector -all
They solved every problem, because I'm working with some toolboxes created by others so I did not know where to look..
In my opinion, any toolbox which overrides the built-in assert is of such a bad quality that it's not worth using. What other problems does it hide?
So, is your problem solved now?
Yes it is! Thanks
The toolbox has been provided by a professor for a university project....
I have the same problem, what I have to do to fix it?
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.

Accedi per commentare.

Più risposte (1)

Kenneth Davis
Kenneth Davis il 13 Ago 2020
Modificato: Kenneth Davis il 13 Ago 2020

0 voti

In defense of authors of code with functions overlapping built-in functions... some of us wrote code before such functions were built into MATLAB.

Categorie

Scopri di più su Interactive Control and Callbacks in Centro assistenza e File Exchange

Prodotti

Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by