changing values of an edit box on gui while timer is printing on a figure
2 次查看(过去 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 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!