Changeset 379 for trunk/src/xml2struct.m


Ignore:
Timestamp:
Jan 27, 2012, 1:59:18 AM (12 years ago)
Author:
sommeria
Message:

several bugs corrected
set_object.fig rationalized so that read_set_object is replaced by the rgeneral fct read_GUI.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/xml2struct.m

    r369 r379  
    2323            out.(names{k})=convert_string(s.(names{k}));
    2424        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
    2827            out=s;
    2928        else
    3029            out=str2num(s);
     30        end
     31    case 'cell'
     32        for ilist=1:numel(s)
     33            out(ilist,:)=str2num(s{ilist});
    3134        end
    3235    otherwise
Note: See TracChangeset for help on using the changeset viewer.