www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/+mbcmodelview/@OutlierLine/dataResize.m

    function dataResize(obj, hnd)
% OUTLIERLINE/DATARESIZE
%
% DATARESIZE(OL, HND)
% reset datasize to that of HND
% check current line handles of OL and delete any that have wrong data length
% 
% called by listener to 'xdata' property of lines 

%  Copyright 2000-2015 The MathWorks, Inc. and Ford Global Technologies, Inc.



% ======== CURRENTLY NOT BEING CALLED ===========


% check hnd is a current line
if any(ismember(obj.lineHandles,hnd))

	%check which current lines have correct datalength
	obj.DataSize =  length(get(hnd(1),'XData'));

	% reset the outlierIndices to those we can currently draw
	obj.outlierIndices = obj.outlierIndices(obj.outlierIndices<=obj.datasize);

	% the lines we are keeping
	goodLines = isLineHandle(obj, obj.lineHandles, obj.DataSize);
	
	% remove all invalid lines
	badLines = obj.lineHandles(~ismember(obj.lineHandles, goodLines));
	remove(obj, badLines);
end