Newly Installed Matlab can't run any function or script at all

22 views (last 30 days)
Tianxiao Ye
Tianxiao Ye on 19 Jul 2015
I just installed Matlab R2015a on my Window 7.
However, once I start the Matlab program, it indicates a bunch of errors and cannot run any function or command at all.
The errors I received are as followed:
"Warning: Function loglog has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict."
All the buildin functions are having this problem.
"Attempt to execute SCRIPT disp as a function:
Error in matlabrc (line 72)
Attempt to execute SCRIPT which as a function:
com.mathworks.jmi.MatlabException: Attempt to execute SCRIPT narginchk as a function:
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 tried "which function-all", but even the which function cannot run.
In fact, I cannot even close the program. Once I click the close icon, it returns:
"Attempt to execute SCRIPT builtin as a function:
I've re-installed Matlab several times, but every time the problem occurs.
So what might be the problem and how can I solve it? Thank you,

Answers (3)

Steven Lord
Steven Lord on 20 Jul 2015
Where did you install MATLAB? Did you map that drive to E:\? If so, are you in the directory E:\toolbox\matlab\lang when you start MATLAB?
Alternately, do you have the toolbox directories from a different installation of MATLAB on this MATLAB installation's path? That's not going to work and could cause this type of errors.
Try restoring the default search path. If you start MATLAB in the toolbox/local subdirectory under your MATLAB root directory, you should be able to invoke RESTOREDEFAULTPATH as the first command in your MATLAB session. Try that and see if MATLAB starts working; if it does, save the path using the path tool GUI.

Sudhanshu Bhatt
Sudhanshu Bhatt on 21 Jul 2015
Hi Tianxiao Ye,
Assuming that MATLAB 2015a is not installed in E:\\toolbox\ directory, the issue could be that the directory and functions mentioned in the error messages were added to your path accidentally or by another user.
Below mentioned are a few suggestions that might help you:
Remove the path mentioned in the error messages:
>> rmpath('E:\\toolbox\')
After removing the path, if the functions work then save the path using the command below:
>> savepath
If function " rmpath " does not work, then you may have to manually delete all the folders.
Once you have removed the path, restart MATLAB 2015a and execute the following command:
>> restoredefaultpath
To check the installation directory for MATLAB, execute the following command:
>> matlabroot
To check all the paths saved in your deafult PATH location, execute the following command:
>> path
If this does not help in solving the issue, please contact Technical Support by creating a new case: Create a new case
Hope this helps.
Sudhanshu Bhatt

Muhammad Usman Saleem
Muhammad Usman Saleem on 8 Oct 2015

Community Treasure Hunt

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

Start Hunting!