📄 syminfo.m
字号:
function info = syminfo(S, vname, vtype, vkind, vindex)% info = syminfo(S, vname, vtype, vkind, vindex)% extract infos from the symble table% look up the symble table for entries matching the query % item.name == name AND item.type == type AND item.kind == kind% empty field ('') matches all entries% % INPUT:% S : the system name% vname : var name as in the Hysdel source% vtype : var type ('b','r')% vkind : var kind ('x','u','d','z')% vindex: var index%% OUTPUT% info : cell array of info records saisfying the query% % REMARK% the contents of the syminfo records are detailed in the HYSDEL manual in the % section describing the MLD-structure% % (C) 2001 by F.D. Torrisi% Automatic Control Laboratory, ETH Zentrum, CH-8092 Zurich, Switzerland% torrisi@aut.ee.ethz.ch%% see license.txt for the terms and conditions.if nargin == 0 disp('Version 0.01') info='0.01'; returnend error(nargchk(1,5,nargin));% ==============================================================================% Define optional arguments% ==============================================================================if nargin <= 4 vindex = '';endif nargin <= 3 vkind = '';endif nargin <= 2 vtype = '';end if nargin <= 1 vname = '';endN_s = size(S.symtable,2);rep = 0;for i = 1:N_s if (isempty(vname) | strcmp(S.symtable{i}.name,vname)) & ... (isempty(vtype) | strcmp(S.symtable{i}.type,vtype)) & ... (isempty(vkind) | strcmp(S.symtable{i}.kind,vkind)) & ... (isempty(vindex) | S.symtable{i}.index == vindex) , rep = rep + 1; info{rep} = S.symtable{i}; endend
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -