Restore to default path issue

Hello, I am trying to restore path to default but I get an error message.
When I click Set Path I get the following error message:
Attempt to execute SCRIPT mfilename as a function:
C:\Users\s\Desktop\matlab\mcr\toolbox\matlab\lang\mfilename.m
Error in pathtool (line 11)
error(javachk('swing', mfilename));
I tried the restoredefaultpath command but then I got this error message:
Error: File: restoredefaultpath.m Line: 1 Column: 25
The input character is not valid in MATLAB statements or expressions.
Can you help me?

Answers (1)

Walter Roberson
Walter Roberson on 3 Sep 2021
See https://www.mathworks.com/matlabcentral/answers/309984-what-is-the-default-location-of-the-matlab-preferences-directory for information about where to look for your preferences directory. Quit MATLAB (if you are in it), and rename or delete that directory, and then go back into MATLAB.
You should not be putting mcr directories onto your MATLAB path. MCR is only for stand-alone execution of compiled executables.

Categories

Products

Release

R2016b

Tags

Community Treasure Hunt

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

Start Hunting!