📄 mfbox_xml2whos.m
字号:
function w=mfbox_xml2whos(xmlinput)% Copyright by Peter Gruber and Fabian J. Theis% Signal Processing & Information Theory group% Institute of Biophysics, University of Regensburg, Germany% Homepage: http://research.fabian.theis.name% http://www-aglang.uni-regensburg.de%% This file is free software, subject to the % GNU GENERAL PUBLIC LICENSE, see gpl.txt%% inspired by Jonas Almeida, almeidaj@mussc.edu, 20 Aug 2002, XML4MAT Tboxxmlinput(end+1) = ' ';spc = isspace(xmlinput);fspc = find(spc);w = struct();w.class = xmlinput(1:fspc(1)-1);i = 1;nspc = length(fspc);while (i<nspc) i = i+find(fspc((i+1):end)~=(fspc(i:(end-1))+1),1)-1; prop = xmlinput((fspc(i)+1):end); fquo = find(prop=='"',2); prop = prop(1:fquo(2)); i = find(fspc>(fquo(2)+fspc(i)),1); fequ = find(prop=='='); if (length(fequ)~=1 || length(fquo)~=2 || fequ(1)~=fquo(1)-1) warning('Invalid attribute %s',prop); else w.(prop(1:(fequ(1)-1))) = prop((fquo(1)+1):(fquo(2)-1)); endendif (isfield(w,'size')) w.size = str2num(w.size);endif (~isfield(w,'name')) w.name = 'ans';endreturn
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -