How do I return values from figure with out closing the figure

2 views (last 30 days)
I have generated a figure using GUIDE. The figure enables to set a group of values. These values are returned to the calling function upon deleting the figure. I would like to add an Apply button to a figure such that upon pressing it, the selected values will be returned to the calling function, with out deleting the figure window.

Answers (1)

Jan
Jan on 18 Aug 2022
I assume, the calling function is stopped by uiwait? Then closing the function let Matlab resume the processing in the called. But what will happen, if the "Apply" it hit the 2nd time? Then no caller is waiting.
Of course it is possible: You can remove the edelete() command from the code.
Buti this sounds like a wrong program structure. Prefer to let the Apply button starts a function with the given parameters. This works repeatedly, because it is not required that a called is waiting.

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by