I'm designing a Matlab app with the app designer. In the app GUI_mirror_cooling I have a 'run' button that executes a simulation script, sim_cooling_GUI. Since the simulation may take a long time, it would be nice to have a progress field. By calling a GUI_mirror_cooling update function periodically, this text field would be updated.
function RunButtonPushed(app, event)
And in sim_cooling_GUI, when current time is a fraction of the end time:
if t/t_end >= disp_update/100
disp_update = disp_update + 1;
The time step size is nonconstant, therefore I have a >= with disp_update.
Now, in the app GUI_mirror_cooling,
methods (Access = public)
app.ProgressEditField.Value = [num2str(progress),'%'];
app.ExpectedendtimeEditField.Value = num2str(ETA);
This however opens a new app window for every 1 % progress (with the correct progress field value). What I need is that the app window that is already open has its value updated. I have seen similar (old) questions that use handles, however I am unsure how to access the fields of the app window.