Changeset 1016 for trunk/src/series


Ignore:
Timestamp:
Oct 5, 2017, 7:47:58 PM (7 years ago)
Author:
sommeria
Message:

bugs repaired for multilevel series

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/civ_input.m

    r1010 r1016  
    320320if ~isfield(Param.IndexRange,'first_j')||isequal(MaxIndex_j,MinIndex_j)% no possibility of j pairs
    321321    set(handles.ListPairMode,'Value',1)
    322     set(handles.ListPairMode,'String',{'series(Di)'})
     322    PairMenu={'series(Di)'};
    323323elseif  MaxIndex_i==1 && MaxIndex_j>1% simple series in j
    324     set(handles.ListPairMode,'String',{'pair j1-j2';'series(Dj)'})
     324    PairMenu={'pair j1-j2';'series(Dj)'};
    325325    if  MaxIndex_j <= 10
    326326        set(handles.ListPairMode,'Value',1)% advice 'pair j1-j2' except in MaxIndex_j is large
    327327    end
    328328else
    329     set(handles.ListPairMode,'String',{'pair j1-j2';'series(Dj)';'series(Di)'})%multiple choice
     329    PairMenu={'pair j1-j2';'series(Dj)';'series(Di)'};%multiple choice
    330330    if strcmp(NomTypeNc,'_1-2_1')
    331331        set(handles.ListPairMode,'Value',3)% advise 'series(Di)'
     
    334334    end
    335335end
     336set(handles.ListPairMode,'String',PairMenu)
     337
     338%% set default choice of pair mode
     339PairIndex=[];
     340if isfield(Param,'ActionInput') && isfield(Param.ActionInput,'PairIndices')
     341    PairIndex=find(strcmp(Param.ActionInput.PairIndices.ListPairMode,PairMenu));
     342end
     343if isempty(PairIndex)
     344    if ~isfield(Param.IndexRange,'first_j')||isequal(MaxIndex_j,MinIndex_j)% no possibility of j pairs
     345        PairIndex=1;
     346    elseif  MaxIndex_i==1 && MaxIndex_j>1% simple series in j
     347        if  MaxIndex_j <= 10
     348            PairIndex=1;% advice 'pair j1-j2' except in MaxIndex_j is large
     349        end
     350    else
     351        if strcmp(NomTypeNc,'_1-2_1')
     352            PairIndex=3;% advise 'series(Di)'
     353        elseif  MaxIndex_j <= 10
     354            PairIndex=1;% advice 'pair j1-j2' except in MaxIndex_j is large
     355        end
     356    end
     357end
     358set(handles.ListPairMode,'Value',PairIndex); 
    336359
    337360%% indicate the min and max indices i and j on the GUI
Note: See TracChangeset for help on using the changeset viewer.