gcb.m

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

M
25
字号
function curblock=gcb(sys)
%GCB	Get current block.
%	B = GCB returns the name to the current block in a SIMULINK
%	model.  The current block is the most recent block within the
%	current system that was clicked in.  In addition, while a
%	simulation is running, S-Function blocks are the current block
%	while they are being evaluated.
%
%	See also GET_PARAM.

%	Copyright (c) 1984-94 by The MathWorks, Inc.
%	Rick Spada  12-10-93

if nargin < 1,
  [cs,cb] = get_param;
else
  [cs,cb] = get_param(sys);
end

if isempty(cs)
  curblock = [];
else
  curblock = [cs '/' cb];
end

⌨️ 快捷键说明

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