フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Strange GUI behaviour : manually setled parameters saved as hard default values...

1 回表示 (過去 30 日間)
Bastien Rouzé
Bastien Rouzé 2017 年 8 月 16 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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 件のコメント
Bastien Rouzé
Bastien Rouzé 2017 年 8 月 22 日
Hi, thanks for your answer, unfortunately I can not put my code online. However, I tried to look step by step what should be wrong, but I found nothing. It is like if I was / the code was able to write permanently something into a field of a ui-object.
Adam
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
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.

この質問は閉じられています。

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by