www.gusucode.com > 声音的处理有:LPC,FFT,共振峰,频谱源码程序 > siganlandsystemusingMatlab/SSUM/library/close_figure.m

    function close_figure(figobject,varargin)
%CLOSE_FIGURE Create a close-figure dialogue
%   CLOSE_FIGURE(FIGOBJECT, FIGNAME) will create a dialogue box asking if
%   it is ok to close the figure named FIGNAME. If user selects 'YES'
%   FIGOBJECT is closed.
%
%   Example:
%   Author(s): Bob L. Sturm, 20030701-03 
%   Copyright 2003 University of California, Santa Barbara 
%   $Revision: 1.20 $  $Date: 2002/03/28 17:31:26 $

    close(figobject)
	return;

	if nargin > 1,
		figname = varargin{1};
		selection = questdlg(['Close ' figname  '?'],...
							 ['Close ' figname '...'],...
							 'Yes','No','Yes');
		if strcmp(selection,'Yes')
    		close(figobject)
		end
	else
    	close(figobject)
	end