How to avoid this warning?
显示 更早的评论
Hi, I have made a gui using GUIDE. When i call a function that is changing the path of matlab current directory. I get the following warning:
Warning: Function plot has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
> In gui>browse_Callback at 313 In gui_mainfcn at 96 In gui at 42 In @(hObject,eventdata)gui('browse_Callback',hObject,eventdata,guidata(hObject))
There appears also a warning upon startup of Matlab:
Warning: Function plot has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict. I have already tried this http://www.mathworks.com/matlabcentral/answers/215315-warnings-and-error-messages-after-launching-matlab-r2015a-for-the-first-time Thanks alot
1 个评论
Stephen23
2016-1-26
Why bother changing directory anyway? It is easier to pass an absolute/relative path. Doing so also avoids a the pain of debugging while changing directories.
采纳的回答
更多回答(1 个)
jgg
2016-1-25
0 个投票
You've created a function named plot which has the same name as another function already in Matlab.
To fix this, simply rename your plot function something like plot_v and save it in a file with the updated name.
类别
在 帮助中心 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!