⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 find_masked_blocks.m

📁 CheckMate is a MATLAB-based tool for modeling, simulating and investigating properties of hybrid dyn
💻 M
字号:
function blockH = find_masked_blocks(sys,masktype)

% Find masked blocks in a flat Simulink system
%
% Syntax:
%   "blockH = find_masked_blocks(sys,masktype)"
%
% Description:
%   "find_masked_blocks(sys,masktype)" returns an array of handles to all
%   blocks in "sys" of type "masktype".
%
% Note:
%   "find_masked_blocks()" assumes a flat Simulink system which means
%   that it will not search below the root level in the system
%   hierarchy. 

% Find all masked blocks in the current system, assuming flat simulink
% model.
blocks = find_system(sys,'SearchDepth',1,'MaskType',masktype);

% Get the simulink handle for each block and put it in a vector
blockH = zeros(1,length(blocks));
for k = 1:length(blocks)
  blockH(k) = get_param(blocks{k},'Handle');
end
return

⌨️ 快捷键说明

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