Why my GUI (made with guide) opens with a specific image on my computer, and gives error while loading another one?
1 次查看(过去 30 天)
显示 更早的评论
This is the error I get, when I try to load new image (the image is loaded my moving cursor on GUI gives this error):
*Error while evaluating Figure WindowButtonMotionFcn
Error using matlab.graphics.primitive.Image/get Invalid or deleted object.
Error in impixelinfoval/displayPixelInfo (line 126) elseif strcmp(get(him,'tag'),'rset overview')
Error in iptaddcallback/callbackProcessor (line 147) fun(varargin{:});
Error while evaluating Figure WindowButtonMotionFcn*
Previously it was working fine. Now when I load the GUI by running .m file, it opens in one folder above and not in the same folder :(. Please help!!! I am using MATLAB 2016a
2 个评论
Adam
2016-3-22
You haven't given enough information. We don't know what is in your WindowButtonMotionFcn.
If it is doing something expecting an image to be there, but you have temporarily deleted the image while you load another one then that would lead to something similar to that.
I'm not really sure what you mean about the folder in which it opens and how that related to the error you mention.
采纳的回答
Image Analyst
2016-3-23
编辑:Image Analyst
2016-3-23
Most likely you're not specifying the full filename properly.
See the FAQ: http://matlab.wikia.com/wiki/FAQ#Why_can.27t_my_standalone_compiled_executable_find_my_files.3F
Also, let's see what you do between calling uigetdir() and imread() or whatever.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!