Changeset 379 for trunk/src/xml2struct.m
- Timestamp:
- Jan 27, 2012, 1:59:18 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/xml2struct.m
r369 r379 23 23 out.(names{k})=convert_string(s.(names{k})); 24 24 end 25 case 'char' 26 27 if isempty(regexp(s,'^\d+\.*\d*$'))% if the string contains numerical characters and decimal . only 25 case 'char' 26 if isempty(regexp(s,'^(-*\d+\.*\d*\ *)+$'))% if the string contains a set of numbers (with possible sign and decimal) separated by blanks 28 27 out=s; 29 28 else 30 29 out=str2num(s); 30 end 31 case 'cell' 32 for ilist=1:numel(s) 33 out(ilist,:)=str2num(s{ilist}); 31 34 end 32 35 otherwise
Note: See TracChangeset
for help on using the changeset viewer.