Can't run matlab; 'restoredefaultpath' not working

12 ビュー (過去 30 日間)
eatitor
eatitor 2016 年 11 月 11 日
編集済み: madhan ravi 2018 年 10 月 17 日
Hi,
Everything worked fine before I created my first script and stored it in another folder and tried to run it. Then I could not run anything. The system is Win 8.1 64bit. I re-installed, nothing changed. Here's the message:
Warning: MATLAB did not appear to successfully set the search path. To recover
for this session of MATLAB, type "restoredefaultpath;matlabrc". To find out how
to avoid this warning the next time you start MATLAB, type "docsearch problem
path" after recovering for this session.
Warning: Initializing Java preferences failed in matlabrc.
This indicates a potentially serious problem in your MATLAB setup, which should
be resolved as soon as possible. Error detected was:
MATLAB:UndefinedFunction
Undefined function 'usejava' for input arguments of type 'char'.
> In matlabrc (line 121)
Warning: Initializing MATLAB Graphics failed.
This indicates a potentially serious problem in your MATLAB setup, which should
be resolved as soon as possible. Error detected was:
MATLAB:UndefinedFunction
Undefined function or variable 'ismac'.
> In hgrc (line 163)
In matlabrc (line 127)
Warning: Failed to add default profiler filters.
> In matlabrc (line 136)
Warning: Initializing preferences failed in matlabrc.
This indicates a potentially serious problem in your MATLAB setup, which should
be resolved as soon as possible. Error detected was:
MATLAB:scriptNotAFunction
Attempt to execute SCRIPT feature as a function:
C:\Users\****\Documents\MATLAB\feature.m
> In matlabrc (line 165)
Undefined function or variable 'setInitialWorkingFolder'.
Error in matlabrc (line 197)
setInitialWorkingFolder();

採用された回答

Walter Roberson
Walter Roberson 2016 年 11 月 11 日
You need to rename
C:\Users\Zhengye Bian\Documents\MATLAB\feature.m
to not be named 'feature.m', or move it out of your MATLAB path.
You might also need to remove your preferences directory; https://www.mathworks.com/help/matlab/ref/prefdir.html or your startup.m
  2 件のコメント
eatitor
eatitor 2016 年 11 月 12 日
Thanks a lot, it worked.
madhan ravi
madhan ravi 2018 年 10 月 17 日
編集済み: madhan ravi 2018 年 10 月 17 日
Million thanks to you sir Walter +1!!

サインインしてコメントする。

その他の回答 (1 件)

Preethi
Preethi 2016 年 11 月 11 日
hi,
As soon as you open Matlab, run this command at command prompt and then proceed further
restoredefaultpath;matlabrc
  1 件のコメント
eatitor
eatitor 2016 年 11 月 12 日
Thanks for the help, but this did not work.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by