MatLab: even the provided plot example gets an error

조회 수: 2 (최근 30일)
Paul
Paul 2019년 5월 2일
댓글: Paul 2019년 5월 2일
I bought MatLab yesterday, and am just exploring it.
But even the builtin plot example refuses to run....
Any ideas what's going on here?
>> openExample('graphics/CreateLinePlotExample')
Warning: Function plot has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential
name conflict.
> In exampleUtils.setupWorkDir (line 4)
In setupExample (line 18)
In openExample (line 29)
Warning: Function plot has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential
name conflict.
> In exampleUtils.copyIfMissing (line 8)
In exampleUtils.setupMainFile (line 5)
In setupExample (line 21)
In openExample (line 29)
Warning: Function plot has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential
name conflict.
> In matlab.codetools.internal.getActionForFileType (line 33)
In edit>getFileTypeEditor (line 659)
In edit>hasFileTypeEditor (line 651)
In edit>openEditor (line 204)
In edit>openWithFileSystem (line 498)
In edit (line 49)
In openExample (line 90)
Warning: Function plot has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential
name conflict.
> In matlab.codetools.internal.getActionForFileType (line 33)
In edit>getFileTypeEditor (line 659)
In edit>openEditor (line 205)
In edit>openWithFileSystem (line 498)
In edit (line 49)
In openExample (line 90)
Warning: Function plot has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential
name conflict.
Warning: Function plot has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential
name conflict.
Warning: Function plot has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential
name conflict.
Warning: Function plot has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential
name conflict.
Warning: Function plot has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential
name conflict.
Warning: Function plot has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential
name conflict.
Exception in thread "AWT-EventQueue-0": java.lang.NullPointerException
at sun.lwawt.macosx.CAccessibility.propertyChange(CAccessibility.java:83)
at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:328)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
at java.awt.KeyboardFocusManager.firePropertyChange(KeyboardFocusManager.java:1493)
at java.awt.KeyboardFocusManager.setGlobalFocusOwner(KeyboardFocusManager.java:575)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:603)
at java.awt.Component.dispatchEventImpl(Component.java:4760)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
Warning: Function plot has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential
name conflict.
  댓글 수: 2
Ken Atwell
Ken Atwell 2019년 5월 2일
Type:
which -all plot
and add the results to this posting.
Paul
Paul 2019년 5월 2일
Thankyou, I got help from the Discord channel just a few minutes ago.
I had saved my script as plot.m, and aparrently that was conflicting.
I started a new script and physically deleted all plot.m files and it started working

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by