www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtradeoffgui/@mmSiteGraphView/pUpdateModelSites.m
function pUpdateModelSites(obj) %PUPDATEMODELSITES Update model site positions % % PUPDATEMODELSITES(OBJ) updates the display with the current model site % positions. % Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc. if ~isempty(obj.MessageService) ... && length(obj.MessageService.SwitchInputs)==2 axisorder = obj.MessageService.AxisOrder; % Sites that are included in model mdl = obj.MessageService.SampleTakenModel; pts = getSwitchPoints(mdl); IsHit = isSwitchPointOnGrid(mdl, obj.MessageService.Breakpoints{:}); set(obj.hSiteHitLine, 'XData', pts(IsHit, axisorder(2)), ... 'YData', pts(IsHit, axisorder(1))); set(obj.hSiteMissedLine, 'XData', pts(~IsHit, axisorder(2)), ... 'YData', pts(~IsHit, axisorder(1))); % Sites that have been excluded from model mdl = obj.MessageService.SampleRejectedModel; pts = getSwitchPoints(mdl); set(obj.hSiteExcludedLine, 'XData', pts(:, axisorder(2)), ... 'YData', pts(:, axisorder(1))); else set([obj.hSiteHitLine; obj.hSiteMissedLine; obj.hSiteExcludedLine], ... 'XData', [], 'YData', []); end