www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@xregGui/@figureaxes/getmidaxes.m

    function ax=getmidaxes(fa,fH)
%GETMIDAXES Return the figureaxes middle layer object for a figure
%
%  AX = GETMIDAXES(OBJ, FIG) finds and returns the handle to the axes that
%  are acting as the middle layer figure canvas axes.

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


% search for figure in known list
FIGi = [];
if ~isempty(fa.Figures)
    removebadentries(fa);
    FIGi = (fH==fa.Figures);
end

if ~any(FIGi);
    % create entry for figure
    createentry(fa,fH);
    FIGi = length(fa.Figures);
end

ax = fa.MidAxes(FIGi);