bdclose.m

来自「数字通信第四版原书的例程」· M 代码 · 共 38 行

M
38
字号
function bdclose(sys)
%BDCLOSE Close a SIMULINK model window.
%	BDCLOSE(SYS) Close the model window with the name SYS.
%	BDCLOSE, by itself, closes the current model window.
%
%	BDCLOSE closes the block diagram unconditionally and without confirmation.
%
%	BDCLOSE('name') closes the named block diagram.
%
%	BDCLOSE('all') closes all block diagrams.
%
%	See also CLOSE_SYSTEM.

%	Copyright (c) 1990-94 by The MathWorks, Inc.
%	Rick Spada  6-9-93

% no args, close the current system
if nargin == 0,
  if ~isempty(get_param),
	close_system(get_param,0);
  end

  return;
end;

% existing block diagram, close it
if exist(sys)==4,
  close_system(sys,0);
  return;
end

% sys == 'all', close all block diagrams
if strcmp(lower(sys),'all'),
  while ~isempty(get_param),
	close_system(get_param,0);
  end;
end;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?