www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xregMdlGui/@rbfprune/updatePlot.m

    function updatePlot(obj)
% Update plot

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



if ~isempty(obj.possValues)
    ncenters = obj.NCenters;
    log10GCV = obj.possValues(obj.CurrentLineIndex,obj.NCenters);  
    % Change the XData and YData properties of the current point, thereby moving
    % the big red circle
    set(obj.CurrentPtH,'XData',ncenters,'YData',log10GCV);
    % Make sure the editbox has the correct value
    set(obj.editH,'String',num2str(ncenters));
    % replot residuals
    obj.drawResiduals;
    
    % Update CurrentLIne Callbacks
    currentLineIndex = obj.CurrentLineIndex;
    allLineHandles = obj.LineH;
    currentLineHandles = allLineHandles(currentLineIndex,:);
    % Remove old bdf's
    set(allLineHandles,'ButtonDownFcn','');
    set(allLineHandles,'HitTest','off');
    % Set new line bdf'
    set(currentLineHandles,'ButtonDownFcn',{@i_bdf,obj});
    set(currentLineHandles,'HitTest','on');
end

function i_bdf(src,evt,obj)
% Dispatch line BDF to the lineClickedCallback method
obj.lineClickedCallback