Strange GUI behaviour : manually setled parameters saved as hard default values...
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
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 comentarios
Image Analyst
el 18 de Ag. de 2017
Difficult to say without your code. You can upload it if you want. Search for all cases where you refer to the handle of one of the controls and try to figure out why/where it gets changed by putting a breakpoint on all those lines.
Bastien Rouzé
el 22 de Ag. de 2017
Adam
el 22 de Ag. de 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?
Respuestas (1)
Jan
el 22 de Ag. de 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.
La pregunta está cerrada.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!