Ignore:
Timestamp:
Jul 26, 2010, 11:20:39 PM (14 years ago)
Author:
sommeria
Message:

aver_stat and time_series: bug repairs for reading images, for time series, the projection of images on a line now works
get_field: various bug repairs, export field on work space activated
struct2nc and struct2nc_toolbox.m: small bug repaired
nomtype2pair: test on string input introduced to avoid error
cell2tab: test on multiline input introduced
civ: pb about cell repair (bug with recent versions of matlab)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/nomtype2pair.m

    r59 r107  
    3131%determine nom_type_nc:
    3232nom_type_pair=[];%default
    33 switch nom_type
    34     case {'_i_j'}
    35         if Dtj>0 || Dtj<0
    36             nom_type_pair='_i_j1-j2';
     33if ischar(nom_type)
     34    switch nom_type
     35        case {'_i_j'}
     36            if Dtj>0 || Dtj<0
     37                nom_type_pair='_i_j1-j2';
     38                if Dti>0 || Dti<0
     39                    nom_type_pair='_i1-i2_j1-j2';
     40                end
     41                elseif Dti>0 || Dti<0
     42                nom_type_pair='_i1-i21_j';   
     43            else
     44                 nom_type_pair='_i_j';
     45            end
     46        case {'_i1-i2_j'}
     47            if Dtj>0 || Dtj<0
     48               nom_type_pair='_i1-i2_j1-j2';
     49            else
     50                nom_type_pair='_i1-i2_j';
     51            end
     52        case {'i_j1-j2'}
    3753            if Dti>0 || Dti<0
    38                 nom_type_pair='_i1-i2_j1-j2';
     54               nom_type_pair='_i1-i2_j1-j2';
     55            else
     56                nom_type_pair='_i1-i2_j';
    3957            end
    40             elseif Dti>0 || Dti<0
    41             nom_type_pair='_i1-i21_j';   
    42         else
    43              nom_type_pair='_i_j';
    44         end
    45     case {'_i1-i2_j'}
    46         if Dtj>0 || Dtj<0
    47            nom_type_pair='_i1-i2_j1-j2';
    48         else
    49             nom_type_pair='_i1-i2_j';
    50         end
    51     case {'i_j1-j2'}
    52         if Dti>0 || Dti<0
    53            nom_type_pair='_i1-i2_j1-j2';
    54         else
    55             nom_type_pair='_i1-i2_j';
    56         end
    57     case {'i1-i2_j1-j2'}
    58          nom_type_pair='_i1-i2_j1-j2';
    59     case '#a'
    60         if Dtj>0 || Dtj<0
    61             nom_type_pair='#_ab';
    62         end
    63     otherwise
    64         if Dti>0 || Dti<0
    65            nom_type_pair='_i1-i2';
    66         end
     58        case {'i1-i2_j1-j2'}
     59             nom_type_pair='_i1-i2_j1-j2';
     60        case '#a'
     61            if Dtj>0 || Dtj<0
     62                nom_type_pair='#_ab';
     63            end
     64        otherwise
     65            if Dti>0 || Dti<0
     66               nom_type_pair='_i1-i2';
     67            end
     68    end
    6769end
Note: See TracChangeset for help on using the changeset viewer.