Changeset 697 for trunk/src/xml2struct.m


Ignore:
Timestamp:
Nov 6, 2013, 10:52:01 PM (10 years ago)
Author:
sommeria
Message:

bug corrected in geometry_calib: more precise determination ofcalib points
xml2struct corrected to work in background

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/xml2struct.m

    r687 r697  
    6060        end
    6161    case 'char'
    62         out=ss; %reproduce the input string
    6362        % try to convert to number if the char does not correspond to a function (otherwise str2num calls this function as it uses 'eval')
    6463        if ~isempty(regexp(ss,'^(-*\d+\.*\d*\ *)+$')) || ~isempty(regexp(ss,'\d+e(-|+)\d+')) % if the string corresponds to a set of numbers (with possible sign and decimal, or scientific notation) separated by blanks
     
    6867            if ~isempty(sep_ind)
    6968                sep_ind=[-2 sep_ind length(ss)+1];
     69                out={};
    7070                for icolumn=1:length(sep_ind)-1
    71                     out{1,icolumn}=ss(sep_ind(icolumn)+3:sep_ind(icolumn+1)-1);
     71                    out{1,icolumn}=ss(sep_ind(icolumn)+3:sep_ind(icolumn+1)-1);% get info between separators as a cell array
    7272                end
    7373            else
     
    7676        end
    7777    case 'cell'
    78         out=[];%default
     78        out={};%default
    7979        check_numeric=zeros(size(ss));
    8080        for ilist=1:numel(ss)
Note: See TracChangeset for help on using the changeset viewer.