changing values of an edit box on gui while timer is printing on a figure
1 view (last 30 days)
Show older comments
Hello,
I am running a timer, where it takes real data and plots them every 0.1 seconds. I am plotting the data on a normal figure(not embedded in gui). I also created a gui so that i can change some values in real time. However, whenever I click on edit box to change some values, I have only 0.1 sec to write something in the edit box (which is not enough...) before the plot callback command runs. Once the plot callback commands starts I have to click with my mouse again in the edit box to be able to write in it..
Is there a way, to make the gui the main window so that i can write in edit boxes while updating the figure in real time?
Thanks.. M
0 Comments
Accepted Answer
Sean de Wolski
on 6 Nov 2012
Edited: Sean de Wolski
on 6 Nov 2012
How are you plotting it? If you update the Data of an existing HG object, focus will not be requested. Consider this example:
figure;axes;
hPlot = plot(1:10);
T = timer('Period',0.25,'TimerFcn',@(~,~)set(hPlot,'YData',rand(1,10)),...
'TasksToExecute',200,'ExecutionMode','FixedRate'); %Note updatign existing line!
start(T);
figure;
uicontrol('style','edit','String','Type in me!');
0 Comments
See Also
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!