hf =
0x0 empty GraphicsPlaceholder array.
gui_name =
Event_listener_GUI
Error using guidata (line 87)
H must be the handle to a figure or figure descendent.
Error in Event_listener_GUI>localEventListener (line 232)
handles = guidata(mfilename)
Warning: Error occurred while evaluating listener callback.
function localEventListener (block, eventdata)
hf = findall(0,'Tag',mfilename)
gui_name = mfilename
handles = guidata(mfilename)
thisLineHandle = handles.ad.LineHandles([handles.ad.viewing.BlockHandle]...
==block.BlockHandle);
xdata = get(thisLineHandles, 'XData');
ydata = get(thisLineHandles,'YData');
sTime = block.CurrentTime;
data = block.InputPort(1).Data;
if length(xdata)<1001
newXData = [xdata sTime];
newYData = [ydata data];
else
newXData = [xdata(2:end) sTime];
newYData = [ydata(2:end) data];
end
set(thisLineHandle,'XData',newXData,'YData',newYData);
newXLim = [max(0,sTime-10) max(10,sTime)];
set(handles.axes1,'XLim',newXLim);