www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xreghybridrbf/annotate.m
function annotate(m,Xs,Ys,ax) %ANNOTATE Annotate response plot (from model/plot) % % ANNOTATE(M, X, Y, AX), where X and Y are the plotted model data and AX % is the axes to draw into, annotates the model value plot. For a hybrid % RBF this involves plotting the center locations. % Copyright 2000-2015 The MathWorks, Inc. and Ford Global Technologies, Inc. c = get(m.rbfpart,'centers'); TermsIn = Terms(m); nlmterms = length(double(m.linearmodpart)); Xcode = code(m,Xs); centersIn = c(TermsIn(nlmterms+1:end),:); [valExists, aind] = ismembertol(centersIn, Xcode, 1000*eps,'ByRows',true); aind = aind(valExists); h = findobj(ax,'Tag','main line'); Xdata = get(h,'XData'); Ydata = get(h,'YData'); hc = line('Parent',ax,... 'XData',Xdata(aind),'YData',Ydata(aind),... 'Marker','*','MarkerSize',12,... 'LineWidth',2,... 'Tag','rbf center mark',... 'LineStyle','none','Color',[1 0 1]); mbcgui.hgclassesutil.setNotPickable(hc); uistack(hc,'bottom');