My closereq function is empty. How can i replace it?

I am unable to close figures with the "close" command, and just discovered that my closereq m-file only contains:
function closereq(handle,event)
end
I'd like to replace my empty function, but I can't find it anywhere.

 採用された回答

Adam
Adam 2016 年 6 月 29 日

1 投票

function closereq
%CLOSEREQ Figure close request function.
% CLOSEREQ deletes the current figure window. By default, CLOSEREQ is
% the CloseRequestFcn for new figures.
% Copyright 1984-2012 The MathWorks, Inc.
% Note that closereq now honors the user's ShowHiddenHandles setting
% during figure deletion. This means that deletion listeners and
% DeleteFcns will now operate in an environment which is not guaranteed
% to show hidden handles.
if isempty(gcbf)
if length(dbstack) == 1
warning(message('MATLAB:closereq:ObsoleteUsage'));
end
close('force');
else
delete(gcbf);
end

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeInteractions, Camera Views, and Lighting についてさらに検索

タグ

質問済み:

2016 年 6 月 29 日

コメント済み:

2016 年 6 月 30 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by