MATLAB Answers


On Startup: Error using eval undefined function 'workspacefunc' for input arguments of type 'struct'

Asked by Schace94
on 6 Sep 2014
Latest activity Commented on by Peeyush Awasthi on 11 Dec 2018
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: .
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 at$3.parseComplete( at$ProductInfoListener$1$ 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$ Source) at java.awt.EventQueue$ Source) at Method) at$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 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( at com.mathworks.jmi.MatlabLooper.sendMatlabMessage( at com.mathworks.jmi.Matlab.mtFeval( at com.mathworks.jmi.MatlabWorker.feval( at com.mathworks.appmanagement.GetAppInstallDirectoryWorker.doOnMatlabThread( at com.mathworks.appmanagement.GetAppInstallDirectoryWorker.doOnMatlabThread( at com.mathworks.appmanagement.AbstractAppManagementMatlabWorker.runOnMatlabThread( at com.mathworks.jmi.MatlabWorker$ at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(
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.


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")

Sign in to comment.

2 Answers

Answer by biancasama on 26 Oct 2016

I had the same problem and I solved by typing "restoredefaultpath;matlabrc". Look at this link: < Error in getDefaultUserFolder at MATLAB startup>

Answer by Mike
on 9 Oct 2014

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.
From above link:
"change the userpath value maually in AppData\Roaming\MathWorks\MATLAB\R2012a\matlab.settings (or corresponding) to (or insert if missing):
or whatever user path you prefer (the dots correspond to some text I left out). Start MATLAB, enjoy."


Sign in to comment.