Is 'newplot' the reason why 'image' and 'plot' are no longer working on my computer?
显示 更早的评论
Hi,
I have been using the plot and image command for years, and did so two weeks ago with no problem. Last week something strange occurred. Can someone help me to get image working again? FYI: I have restarted Matlab, tried Matalb2013a, as well as, Matlab2014b, and restarted my computer. I have tried this with image files (that I displayed in the past) and simple integers.
I thought the problem had to do with image, but now plot is not working. Both have the newplot command in common.
Here are two simple examples and the errors they generate:
>>image([2 45 100 200; 200 300 1 45])
Error using findall Too many input arguments.
Error in clo (line 49) kids_to_delete = setdiff(findall(obj,'serializable','on','-depth',1),obj,'legacy');
Error in cla (line 29) clo(ax, extra{:});
Error in newplot>ObserveAxesNextPlot (line 125) cla(ax, 'reset',hsave);
Error in newplot (line 74) ax = ObserveAxesNextPlot(ax, hsave);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
plot([1 2], [3 4]) Error using findall Too many input arguments.
Error in clo (line 49) kids_to_delete = setdiff(findall(obj,'serializable','on','-depth',1),obj,'legacy');
Error in cla (line 29) clo(ax, extra{:});
Error in newplot>ObserveAxesNextPlot (line 125) cla(ax, 'reset',hsave);
Error in newplot (line 74) ax = ObserveAxesNextPlot(ax, hsave);
采纳的回答
更多回答(3 个)
Youssef Khmou
2015-2-16
0 个投票
In previous version of software it works correctly, if you have used the name 'image' for your constructed function, rename it. Anyway image function is built in function, so we can not see the code.
Sean de Wolski
2015-2-16
which -all findall
My guess is you overloaded findall with your own function. The output for the above should look like this:
C:\Program Files\MATLAB\R2014b\toolbox\matlab\graphics\findall.p
Abdallah Ghazi Faisal Zaid Alkilani
2020-3-28
编辑:Abdallah Ghazi Faisal Zaid Alkilani
2020-3-28
0 个投票
newplot.m function has subfunctions inside that were not terminated with 'end'.
I added an 'end' statement for each function inside newplot.m:
- function axReturn = newplot(hsave)
- function fig = ObserveFigureNextPlot(fig, hsave)
- function ax = ObserveAxesNextPlot(ax, hsave)
and it has worked *fingers crossed*.
I hope this helps.
类别
在 帮助中心 和 File Exchange 中查找有关 Image Processing and Computer Vision 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!