www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@xregMdlGui/@boxcox/lineClickedCallback.m
function lineClickedCallback(obj) %LINECLICKEDCALLBACK % Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc. % a point on the graph was clicked. Get the co-ordinates at which the % mouse down event occurred (in axes units) click_point = get(obj.AxesH,'CurrentPoint'); % extract the x position of the click Xpos = click_point(1,1); % Find which clickable point the actual click occurred closest to Xmetric = abs(obj.possLambda - Xpos); [ms,index]=min(Xmetric); % Change the currently held value of ncenters obj.Lambda = obj.possLambda(index); % This should fire NCenterChanged event.