I have a problem when opening Matlab window

When opening MATLAB window I get a problem that MATLAB window showing signs like this: > In matlabrc (line 158)
Student License -- for use by students to meet course requirements and perform academic research at degree granting institutions only.
Attempt to execute SCRIPT feature as a function: C:\Users\abapihi\Documents\MATLAB\feature.m
Error in matlabrc (line 189) if ~(ismcc isdeployed feature('isdmlworker')) && usejava('jvm')
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.mathworks.mlwidgets.graphics.ModelStateFactory.createNoSelectionModelState(ModelStateFactory.java:251) at com.mathworks.mlwidgets.graphics.PlotToolSetFactory$3.parseComplete(PlotToolSetFactory.java:123) at com.mathworks.mlwidgets.graphics.ModelStateFactory$ProductInfoListener$1$1.run(ModelStateFactory.java:1032) 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) >> load('M.mat') >> std(y) Undefined function or variable 'std'.
Did you mean: >> a=mean(X); Undefined function or variable 'mean'.
>> restoredefaultpath Error using system_dependent Attempt to execute SCRIPT feature as a function: C:\Users\abapihi\Documents\MATLAB\feature.m
Error in userpath (line 56) p = system_dependent('getuserworkfolder');
Error in restoredefaultpath (line 52) matlabpath([userpath, RESTOREDEFAULTPATH_result]);
Undefined function or variable 'rmiml.visibleInToolstrip'.
>>
How can I solve this problem?

댓글 수: 1

i have the same problem, https://github.com/DavidBrainard/BrainardLabToolbox/issues/1

댓글을 달려면 로그인하십시오.

답변 (1개)

Les Beckham
Les Beckham 2016년 3월 22일

0 개 추천

It appears that you have created a script called 'feature' (C:\Users\abapihi\Documents\MATLAB\feature.m).
feature is a built-in Matlab function and Matlab is attempting to call it during startup, but instead it sees your script.
You should rename your script file to avoid this conflict.
A general rule is to avoid naming your own scripts or functions with names that are already used by Matlab. Use the command "which commandname" to check if commandname is already defined/used.

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

질문:

2016년 3월 22일

댓글:

2016년 7월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by