I have written a code that composes of several steps, i.e. several processing steps and then some GUI for visualization and plotting; steps are like: criterion 1, criterion 2, GUI control, and plot.
For repeating of the steps and showing results for different criteria, I need to make the GUI data (variables) get refreshed in a given time step, automatically. I want to embed the functionality within the GUI opening file. I used the following code, but it does not working. Maybe it's because of the 'Running' mode that is 'off'; but I don't know how to turn it on. Could somebody help me, please?
function my_gui_OpeningFcn t = timer;t.StartDelay = 0.1;t.ExecutionMode = 'fixedRate't.Period = 1t.TimerFcn = @(myTimerObj, thisEvent)refreshdata(hObject,handles);start(t)handles.timer = t handles.output = hObject;guidata(hObject, handles);end
Best Answer