trace_pthb_input.m
来自「一个matlab的将军模型」· M 代码 · 共 34 行
M
34 行
function scsbH = trace_pthb_input(pthbH)
% Find handles and order of switched continuous system blocks (SCSBs)
% connected to a polyhedral threshold block (PTHB)
%
% Syntax:
% "scsbH = trace_pthb_input(pthbH)"
%
% Description:
% "trace_pthb_input(pthbH)" returns an ordered list of the SCSBs
% connected to the input of the PTHB with handle "pthbH".
%
% See Also:
% trace_mux_network,trace_scsb_input
% Output: A vector of handles for SCSBs in the order that they connect to the
% input of pthbH
if ~(strcmp(get_param(pthbH,'BlockType'),'SubSystem') & ...
strcmp(get_param(pthbH,'MaskType'),'PolyhedralThreshold'))
error('Input block must be a polyhedral threshold block.')
end
scsbH = trace_mux_network(pthbH,'1');
for k = 1:length(scsbH)
if ~(strcmp(get_param(scsbH(k),'BlockType'),'S-Function') & ...
strcmp(get_param(scsbH(k),'MaskType'),'SwitchedContinuousSystem'))
errmsg = ['Invalid block "' get_param(scsbH(k),'Name') ...
'" connected to polyhedral threshold block "' ...
get_param(pthbH,'Name') '".'];
error(errmsg)
end
end
return
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?