Info
This question is closed. Reopen it to edit or answer.
Strange GUI behaviour : manually setled parameters saved as hard default values...
1 view (last 30 days)
Show older comments
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 Comments
Adam
on 22 Aug 2017
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?
Answers (1)
Jan
on 22 Aug 2017
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 Comments
This question is closed.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!