www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtools/@breakpointeditor/pClearPoint.m

    function pClearPoint(obj,index)
% breakpointeditor/pClearPoint  Private method.
% obj.pClearPoint
% Clears all plotted information for the breakpoint at the specified index.

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

d = obj.userdata;

% Remove any out-of-range indices.
% Better to make this check here than force the callers
% to check bounds before doing pClearPoint(x:x+1);
index(index>length(d.Lines))=[];

if ~isempty(index)
    delete(d.Lines(index));
    delete([d.MissingLines{index}]);
    if ~isempty(d.Points) % could equally test for obj.shownormaliser
        delete(d.Points(index));
        delete([d.PointJoin{index}]);
        delete([d.MissingPoints{index}]);
    end
    obj.userdata = d;
end