www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtools/@breakpointeditor/showbreakpoints.m
function showbreakpoints(obj,normptr,data) %SHOWBREAKPOINTS Displays information for the specified object. % % obj.showbreakpoints(normptr,data) % normptr is an xregpointer to a cgnormaliser or cglookupone % data is (optionally) the feature data associated with the % object's node. Required fields are XData, YData, MData, VarPtrs. % X,Y,M data are matrices of the same size. VarPtrs is an array of % xregpointers to cgvalues. % Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc. obj.normptr = normptr; if nargin<3 data = []; end obj.SFData = data; el = get(obj.userdata.TableGrid,'elements'); if normptr.isa('cgnormaliser') obj.shownormaliser = 1; title = ''; el{2} = obj.userdata.PointAxesWrapper; set(obj.userdata.PointAxesWrapper,'Visible','on'); elseif normptr.isa('cglookupone') obj.shownormaliser = 0; title = 'Axis for '; el{2} = []; % remove PointAxesWrapper set(obj.userdata.PointAxesWrapper,'Visible','off'); else error(message('mbc:cgtools:breakpointeditor:InvalidArgument')); end set(obj.userdata.TableGrid,'elements',el); obj.pClearAxes; d = obj.userdata; BP = normptr.get('breakpoints'); V = normptr.get('Values'); BPL = normptr.get('BPLocks'); obj.internalupdate = 1; obj.BP = BP; obj.BPL = BPL; obj.V = V; obj.internalupdate = 0; input = normptr.get('x'); if ~isempty(input) var = input.getname; var = [' (' var ')']; else var = ''; end obj.title = [title normptr.getname var]; if obj.shownormaliser obj.TableWrapper.Peer.setNormaliserData([BP(:),V(:)], {'Input','Output'}, ... BPL, obj.shownormaliser) else obj.TableWrapper.Peer.setNormaliserData([BP(:),V(:)], {'Input','Table Output'}, ... BPL, obj.shownormaliser) end lx = obj.LineAxes; px = obj.PointAxes; % calculate sensible X-limits range = mbcmakelimits(BP, 'loose'); set(lx,'XLim',range); set(px,'XLim',range); % these two members must be cell arrays because they can have % empty entries. d.MissingLines = cell(size(BP)); d.MissingPoints = cell(size(BP)); d.PointJoin = cell(size(BP)); obj.userdata = d; for i=1:length(BP) obj.pPlotPoint(i); end try % this may error if, for example there is more than one input to a normaliser obj.pPlotModel; end