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

📄 children.m

📁 matlab数字信号处理工具箱
💻 M
字号:
function child = children(tree,uid)
% XMLTREE/CHILDREN Return children's UIDs of node uid
% FORMAT child = children(tree,uid)
%
% tree   - a tree
% uid    - uid of the element
% child  - array of the UIDs of children of node uid
%_______________________________________________________________________
%
% Return UID's of children of node uid
%_______________________________________________________________________
% @(#)children.m              Guillaume Flandin                02/04/09

error(nargchk(2,2,nargin));

child = [];
uid = uid(:);
l = length(tree);
for i=1:length(uid)
	if uid(i) > 0 & uid(i) <= l
		if strcmp(tree.tree{uid(i)}.type,'element')
			child = [child tree.tree{uid(i)}.contents];
		end
	else
		error('[XMLTree] Invalid UID.');
	end
end
if isempty(child), child = []; end

⌨️ 快捷键说明

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