我用定时器每隔2秒采集一次数据,并且处理之后画图显示在坐标轴里,可是从第二次处理开始总是弹出新figure,我试了论坛里的各种方法,比如设置坐标轴HandleVisibility 为‘on’, NextPlot为‘Replace’,plot时指定坐标轴等等,都不行,还是会弹出新figure,可是我debug单步运行时却没有问题,哪位大神帮忙解决一下啊!
定时器循环执行函数代码如下:
% --- Execute on timer function
function DataAnalyze(hObject,eventdata,handles)
% hObject handle to target_wavelength (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
a = 'A';
b = 'B';
% timer_count is the number of TimerFcn executions that have occurred
% timer_count = get(handles.timer,'TasksExecuted')-1;
timer_count = getappdata(gcf,'Timer_count');
% start_cell is the begin range for xlsread
start_cell = strcat(char