MatLab: even the provided plot example gets an error

2 次查看(过去 30 天)
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 个评论
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 中查找有关 Graphics Performance 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by