%INBOX is a subroutine of the program "fractory.m". It is %itself called by the subroutine "fracgrx.m". This subroutine %contains the instructions for the graphics screen's %WindowButtonUpFcn, which is to select as the current function %the one in which the pointer is at the time of the button- %clicking. If It is in the interior of several functions %simultaneously, it makes a list of all such functions, and %successive button clicks cycle the current function value %through all of these. if exist('inlist')==0 inlist=[]; pntr=get(Gscr,'CurrentPoint'); pntr=chgcrd(pntr,axpos,0); for nn=1:K x1=get(fcns(nn),'XData'); y1=get(fcns(nn),'YData'); A1=[x1(4)-x1(3) x1(2)-x1(3);y1(4)-y1(3) y1(2)-y1(3)]; B1=[x1(3);y1(3)]; if det(A1)~=0 newv=inv(A1)*(pntr-B1); if all((newv<=ones(2,1)) & (newv>=zeros(2,1))) inlist=[inlist;nn]; end end end savlist=inlist; set(Gscr,'WindowButtonMotionFcn','clear inlist'); % 'set(Gscr,''WindowButtonMotionFcn'','' '');']); end if isempty(inlist)==0 oldn=n; if any(inlist==n) n=mod(find(inlist==oldn),size(inlist,1))+1; n=inlist(n); else n=inlist(1); end curdat(11)=8; updatecd end