Freshly (re)installed MatLab R2023b error message upon startup

12 views (last 30 days)
This is the issue i am facing when have reinstalled matlab with extra features like simulink
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 84)
obj.Channel.close();
Error in internal.hotplug.EventSource/delete (line 67)
stop(obj);
Error in internal.hotplug.EventSource (line 37)
internal.hotplug.EventSource.lock();
Error in internal.deviceplugindetection.Manager (line 173)
obj.USBDetectorObject = internal.hotplug.EventSource();
Error in internal.deviceplugindetection.Manager.getInstance (line 246)
devicePluginManagerInstance = internal.deviceplugindetection.Manager();
> In internal.hotplug.EventSource (line 37)
In internal.deviceplugindetection.Manager (line 173)
In internal.deviceplugindetection.Manager.getInstance (line 246)
>>
Error using repmat
Execution of script class as a function is not supported:
C:\Users\sbnda\OneDrive\Documents\MATLAB\class.m
Error in matlab.supportpackagemanagement.internal.getInstalledSupportPackagesInfo (line 15)
installedSupportPackages = repmat( ...
As well when i trying to open simulink it is also showing similar type of issue
Warning: Execution of script class as a function is not supported:
C:\Users\sbnda\OneDrive\Documents\MATLAB\class.m
Error in setdiff>setdiffR2012a (line 189)
if ~strcmpi(class(a),class(b))
Error in setdiff (line 111)
[varargout{1:nlhs}] = setdiffR2012a(varargin{:});
Error in matlab.internal.lang.capability.Capability.Unsupported (line 74)
list = setdiff(capabilityArray, current);
Error in matlab.internal.lang.capability.Capability.require (line 85)
missingRequirements = matlab.internal.lang.capability.Capability.Unsupported(capabilityArray);
Error in matlab.internal.webwindow (line 161)
Capability.require(Capability.WebWindow);
Error in sltemplate.internal.DialogWebBrowser/createWindow
Error in sltemplate.internal.DialogWebBrowser
Error in sltemplate.internal.GalleryBrowserFactory.create
Error in sltemplate.internal.GalleryController
Error in sltemplate.ui.StartPage
Error in sltemplate.ui.StartPage
Error in sltemplate.ui.StartPage/instance
Error in sltemplate.ui.StartPage/getInstance
Error in sltemplate.ui.StartPage/doShow
Error in sltemplate.ui.StartPage.showCustomView
Error in sltemplate.ui.StartPage>@()sltemplate.ui.StartPage.showCustomView('Start',[],varargin{:})
Error in sltemplate.ui.StartPage/showWithFallback
Error in sltemplate.ui.StartPage.show
> In sltemplate.ui.StartPage.showWithFallback
In sltemplate.ui.StartPage.show
Warning: Execution of script class as a function is not supported:
C:\Users\sbnda\OneDrive\Documents\MATLAB\class.m
> In Simulink.start_simulink
In slLibraryBrowser
In sltemplate.ui.StartPage.showWithFallback
In sltemplate.ui.StartPage.show
Warning: Execution of script class as a function is not supported:
C:\Users\sbnda\OneDrive\Documents\MATLAB\class.m
> In slCustomizer/refresh
In slCustomizer.callRefresh
In slCustomizer>@()slCustomizer.callRefresh()
In slCustomizer.staticRefresh
In simulinkrc (line 40)
In Simulink.start_simulink
In slLibraryBrowser
In sltemplate.ui.StartPage.showWithFallback
In sltemplate.ui.StartPage.show
Warning: Execution of script class as a function is not supported:
C:\Users\sbnda\OneDrive\Documents\MATLAB\class.m
> In slCustomizer/refresh
In slCustomizer.callRefresh
In slCustomizer>@()slCustomizer.callRefresh()
In slCustomizer.staticRefresh
In simulinkrc (line 40)
In Simulink.start_simulink
In slLibraryBrowser
In sltemplate.ui.StartPage.showWithFallback
In sltemplate.ui.StartPage.show
Warning: Execution of script class as a function is not supported:
C:\Users\sbnda\OneDrive\Documents\MATLAB\class.m
> In slCustomizer/refresh
In slCustomizer.callRefresh
In slCustomizer>@()slCustomizer.callRefresh()
In slCustomizer.staticRefresh
In simulinkrc (line 40)
In Simulink.start_simulink
In slLibraryBrowser
In sltemplate.ui.StartPage.showWithFallback
In sltemplate.ui.StartPage.show
Warning: Execution of script class as a function is not supported:
C:\Users\sbnda\OneDrive\Documents\MATLAB\class.m
> In slCustomizer/refresh
In slCustomizer.callRefresh
In slCustomizer>@()slCustomizer.callRefresh()
In slCustomizer.staticRefresh
In simulinkrc (line 40)
In Simulink.start_simulink
In slLibraryBrowser
In sltemplate.ui.StartPage.showWithFallback
In sltemplate.ui.StartPage.show
Caught unexpected exception of unknown type.
>>
so i kindly request to resolve my issue as soon as possible

Answers (2)

Steven Lord
Steven Lord on 4 Feb 2024
Rename this script file.
C:\Users\sbnda\OneDrive\Documents\MATLAB\class.m
Its existence by that name prevents MATLAB from calling the class function that is part of MATLAB.

Anjaneyulu Bairi
Anjaneyulu Bairi on 4 Feb 2024
Edited: Anjaneyulu Bairi on 5 Feb 2024
Hi,
I understand that you are getting errors related to "internal.hotplug.EventSource'" while opening MATLAB.
  • The error message has a warning which says "Warning: Execution of script class as a function is not supported:". Try to execute below command in command window of MATLAB and check the the path of the "class" function.
which class.m
  • In error message it is showing that the class file is in OneDrive path, but it should be in datatypes folder. If the class file path doesn't contain datatypes folder then remove that file from above path and remove/rename this class file from your OneDrive path - "C:\Users\sbnda\OneDrive\Documents\MATLAB\class.m".
I hope this helps to resolve your query.

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!