On Startup: Error using eval undefined function 'workspacefunc' for input arguments of type 'struct'
103 次查看(过去 30 天)
显示 更早的评论
Hi I just installed the student version of Matlab R2014a. I had to go through adding an exception to my bitdefender firewall and reinstalling the Microsoft Visual Studio C++ Redistributables for it to be able to startup. I got that solution from this thread here: http://www.mathworks.com/matlabcentral/answers/97167-why-will-matlab-not-start-up-properly-on-my-windows-based-system .
Now when it does finally start after about 10 minutes after I click on it it gives me the error "Error using eval undefined function 'workspacefunc' for input arguments of type 'struct'" in a dialog box.
It then lists the following:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.mathworks.mlwidgets.graphics.ModelStateFactory.createNoSelectionModelState(ModelStateFactory.java:242) at com.mathworks.mlwidgets.graphics.PlotToolSetFactory$3.parseComplete(PlotToolSetFactory.java:128) at com.mathworks.mlwidgets.graphics.ModelStateFactory$ProductInfoListener$1$1.run(ModelStateFactory.java:1023) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$200(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source) com.mathworks.jmi.MatlabException: Error invoking runtime function. Please refer to error message for detail. at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method) at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:265) at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:120) at com.mathworks.jmi.Matlab.mtFeval(Matlab.java:1619) at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:197) at com.mathworks.appmanagement.GetAppInstallDirectoryWorker.doOnMatlabThread(GetAppInstallDirectoryWorker.java:20) at com.mathworks.appmanagement.GetAppInstallDirectoryWorker.doOnMatlabThread(GetAppInstallDirectoryWorker.java:7) at com.mathworks.appmanagement.AbstractAppManagementMatlabWorker.runOnMatlabThread(AbstractAppManagementMatlabWorker.java:21) at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:79) at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:440)
I've tried uninstalling and reinstalling this a couple times and each time had to add the bitdefender exception and reinstall the C++ redistributables in order to run. Additionally each time I try and do something in the command window such as typing "A = 4" it will pause for about 30 seconds and then pop up the same dialog box with the error using eval. However it will then complete the action and print what A is equal to. Also I tried uninstalling java and reinstalling the latest version, then uninstalled Matlab again and reinstalled with same error happening.
2 个评论
Larry
2014-9-6
I'm getting the same error. (After fixing the issue where the shortcut on the desktop doesn't work and having to redirect the shortcut to the Architecture Specific folder containing MATLAB.exe")
回答(2 个)
biancasama
2016-10-26
I had the same problem and I solved by typing "restoredefaultpath;matlabrc". Look at this link: <http://fr.mathworks.com/matlabcentral/answers/39976-error-in-getdefaultuserfolder-at-matlab-startup Error in getDefaultUserFolder at MATLAB startup>
5 个评论
WJ
2021-5-7
This solves the issue temporarily: when I startup Matlab, click away all the errors and run restoredefaultpath;matlabrc , the errors are gone and Matlab functions like it should. However, I have to do it again every time I start Matlab
Mike
2014-10-9
I had the same issue. You have to edit your matlab.settings file. It seems to be that the entry for the user path is blank in the settings file.
Follow this link to find where to edit the file. Just make up any path and it should work. http://www.mathworks.de/matlabcentral/answers/39976-error-in-getdefaultuserfolder-at-matlab-startup
From above link:
"change the userpath value maually in AppData\Roaming\MathWorks\MATLAB\R2012a\matlab.settings (or corresponding) to (or insert if missing):
name="matlab" ..................................................... name="UserPath" string value<![CDATA[C:\Users\**\Documents\MATLAB]]></value> /string /key
or whatever user path you prefer (the dots correspond to some text I left out). Start MATLAB, enjoy."
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!