Changeset 1192 for trunk/src/xml2struct.m
- Timestamp:
- Feb 7, 2026, 9:25:13 PM (2 weeks ago)
- File:
-
- 1 edited
-
trunk/src/xml2struct.m (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/xml2struct.m
r1191 r1192 86 86 case 'char' 87 87 out=str2double(strsplit(ss));% convert to number or vector (str2num applied to a fct name executes this fct by 'eval', thus this possibility had to be ruled out above 88 if isnan(out)88 if find(isnan(out)) 89 89 sep_ind=regexp(ss,'\s&\s');% check for separator ' & ' which indicates column separation in tables 90 90 if ~isempty(sep_ind) … … 102 102 check_numeric=zeros(size(ss)); 103 103 for ilist=1:numel(ss) 104 if ~isnan(str2double(strsplit(ss{ilist}))) 105 out{ilist,1}=str2double(strsplit(ss{ilist})); 106 check_numeric(ilist)=1; 107 else 104 if find(isnan(str2double(strsplit(ss{ilist})))) 108 105 sep_ind=regexp(ss{ilist},'\s&\s');% check for separator ' & ' which indicates column separation in tables 109 106 if ~isempty(sep_ind) … … 115 112 out{ilist,1}=ss{ilist}; %reproduce the input string 116 113 end 114 else 115 out{ilist,1}=str2double(strsplit(ss{ilist})); 116 check_numeric(ilist)=1; 117 117 end 118 118 end
Note: See TracChangeset
for help on using the changeset viewer.
