Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Calling back same GUI as previous in a while loop

1 vue (au cours des 30 derniers jours)
Nidhi SRIVASTAVA
Nidhi SRIVASTAVA le 27 Août 2017
Clôturé : MATLAB Answer Bot le 20 Août 2021
I am working on a program which follows the following structure. I run a while loop whose beginning starts with calling a GUI with some initial default values.I change the values in the edit box of the gUi and Then several operations are run based on the values entered in GUI. After completing a cycle as it enters loop the second time, GUI is called again. But this time I want my GUI to show the previous values. I know this could be done with loadState, saveState but I don't want the GUI to retrieve previous value when the whole program is run again. To keep it simple, I want to start with initial values, keep making change to gui such that every time when while loop runs it shows previous values, but when the program ends and is restarted, the first GUI which appears show the initial default value. If anyone could suggest me anything in this regard, it will be very helpful. Thanks.

Réponses (1)

Jan
Jan le 27 Août 2017
It sounds like all you need is not to close the GUI but keep it open with using the new values.
The description
After completing a cycle as it enters loop the second time, GUI is called again.
is vague only, so I cannot suggest some real code. But the core of the problem seems to be inside "GUI is called again". Do not close the figure, but update its contents. If you want more details, post the relevant part of the code.
  2 commentaires
Nidhi SRIVASTAVA
Nidhi SRIVASTAVA le 27 Août 2017
Modifié(e) : Nidhi SRIVASTAVA le 27 Août 2017
Precisely this is what I want to do, 'To not close the Gui', which to my knowledge I am not doing. As it enters the loop again and meets the GUI command, it opens the GUI fresh again. Could you help me further, please?
Jan
Jan le 27 Août 2017
As long as you do not provide any details, how could I help? "it enters the loop again" and "meets the GUI command" - well, you have to modify the code, obviously. But I cannot know, how the code looks like after your rough rephrasing as text. All I can do is to recommend to remove the code, which "opens the GUI fresh again" and replace it by a version which only updates the contents.
Again: A more specific help is possible, if you post the relevant part of the code. I cannot read your files or your mind.

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by