changing values of an edit box on gui while timer is printing on a figure
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
Sean de Wolski
2012년 11월 6일
편집: Sean de Wolski
2012년 11월 6일
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
추가 답변 (2개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!