I have a problem when opening Matlab window
Show older comments
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 Comment
Julio Garcia
on 7 Jul 2016
i have the same problem, https://github.com/DavidBrainard/BrainardLabToolbox/issues/1
Answers (1)
Les Beckham
on 22 Mar 2016
0 votes
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.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!