Info
此问题已关闭。 请重新打开它进行编辑或回答。
Strange GUI behaviour : manually setled parameters saved as hard default values...
1 次查看(过去 30 天)
显示 更早的评论
Hi all,
So I encountered a strange GUI behaviour during my work. I have made it using GUIDE, which is enough for my objectives.
I can enter parameters into edit fields (setled as 'empty') then start a process (for example calculate a function...) which will display something in two axes...
Normally, when I reset the GUI / restart it, all parameters are empty again and nothing is displayed within both axes. But sometimes, when I ask for strange calculus (for example extreme parameters values for my function), I get a result but when I restart, all parameters and displayed graphics are loaded. It is "definitive" until I set them to ' ' for the edit fields or recreate axes in GUIDE.
Thanks
Maybe sorry for my bad english.
3 个评论
Adam
2017-8-22
I did have the same behaviour once, but unfortunately I can't remember what turned out to be the cause. I assume you haven't saved your running GUI over the top of the .fig file that GUIDE creates?
回答(1 个)
Jan
2017-8-22
sometimes, when I ask for strange calculus (for example extreme parameters values for my
function), I get a result but when I restart, all parameters and displayed graphics are
loaded
What exactly does "when I restart" mean? Do you restart the computer, Matlab, or open the figure again? In the last case: Are you sure that the figure has been closed before?
I cannot imagine, what "extreme" parameters are. Matlab is not impressed by very small or large values. Perhaps you mean "huge" arrays and Matlab is still working while you try to close the figure. Then perhaps the code saves the data or keeps the figure open - but this is wild guessing only. In opposite to my fantasy, the debugger can explain the details clearly: Set a breakpoint in the OpeningFcn and CloseFcn to check, what's going on. Some simple disp() commands could help also to control, what your code is doing. Perhaps the data are stored in persistent variables, and a clear helps. Or you have saved the figure unintentionally and the fig file contains the data. You can check in the property editor.
0 个评论
此问题已关闭。
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!