Changeset 881 for trunk/src/series


Ignore:
Timestamp:
Mar 6, 2015, 9:10:16 PM (10 years ago)
Author:
sommeria
Message:

various bug fix

Location:
trunk/src/series
Files:
3 edited

Legend:

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

    r872 r881  
    8888        if ismember(SeriesData.ProjObject.ProjMode,{'inside','outside'})
    8989            answer=msgbox_uvmat('INPUT_TXT','set bin size for histograms (or keep ''auto'' by default)?','auto');
    90             ParamOut.ActionInput.VarMesh=str2double(answer);
     90            ParamOut.ActionInput.VarMesh=str2num(answer);
    9191        end
    9292    end
  • trunk/src/series/civ_input.m

    r880 r881  
    332332%% list the possible index pairs, depending on the option set in ListPairMode
    333333ListPairMode_Callback([], [], handles)
    334 ListPairCiv1_Callback(hObject, eventdata, handles)
     334%ListPairCiv1_Callback(hObject, eventdata, handles)
    335335
    336336%% set the GUI to modal: wait for OK to close
     
    875875end
    876876nom_type_ima=CivInputData.NomTypeIma;
    877 initial=get(handles.ListPairCiv1,'Value');%previous choice of pair
    878 menu_pair=get(handles.ListPairCiv1,'String');%previous choice of pair.ListPairCiv1
    879 init_choice=menu_pair{initial};
     877menu_pair=get(handles.ListPairCiv1,'String');%previous menu of ListPairCiv1
     878PairCiv1Init=menu_pair{get(handles.ListPairCiv1,'Value')};%previous choice of pair
     879menu_pair=get(handles.ListPairCiv2,'String');%previous menu of ListPairCiv1
     880PairCiv2Init=menu_pair{get(handles.ListPairCiv2,'Value')};%previous choice of pair
    880881
    881882%% determine nom_type_nc, nomenclature type of the .nc files:
     
    973974
    974975%% determine the default selection in the pair menu for Civ1
    975 ichoice=find(select,1);% index of first selected pair
    976 if (isempty(ichoice) || ichoice < 1); ichoice=1; end;
    977 ichoice=find(strcmp(init_choice,displ_pair'),1);
     976%ichoice=find(select,1);% index of first selected pair
     977%if (isempty(ichoice) || ichoice < 1); ichoice=1; end;
     978ichoice=find(strcmp(PairCiv1Init,displ_pair'),1);
    978979if ~isempty(ichoice)
    979980    set(handles.ListPairCiv1,'Value',ichoice);% first valid pair proposed by default in the menu
     
    987988%% determine the default selection in the pair menu for Civ2
    988989if strcmp(get(handles.ListPairCiv2,'Visible'),'on')
    989     initial=get(handles.ListPairCiv2,'Value');
    990     if initial>length(displ_pair')%|~isequal(select(initial),1)
    991         if ichoice <= length(displ_pair')
    992             set(handles.ListPairCiv2,'Value',ichoice);% same pair proposed by default for civ2
    993         else
    994             set(handles.ListPairCiv2,'Value',1);% same pair proposed by default for civ2
    995         end
    996     end
     990    ichoice=find(strcmp(PairCiv2Init,displ_pair'),1);
     991    if ~isempty(ichoice)
     992        set(handles.ListPairCiv2,'Value',ichoice);% first valid pair proposed by default in the menu
     993    else
     994        set(handles.ListPairCiv2,'Value',1)
     995    end
     996   
     997    %
     998    %     initial=get(handles.ListPairCiv2,'Value');
     999    %
     1000    %
     1001    %     if initial>length(displ_pair')%|~isequal(select(initial),1)
     1002    %         if ichoice <= length(displ_pair')
     1003    %             set(handles.ListPairCiv2,'Value',ichoice);% same pair proposed by default for civ2
     1004    %         else
     1005    %             set(handles.ListPairCiv2,'Value',1);% same pair proposed by default for civ2
     1006    %         end
     1007    %     end
    9971008else
    9981009    set(handles.ListPairCiv2,'Value',get(handles.ListPairCiv1,'Value'))% initiate the choice of Civ2 as a reproduction of if civ1
  • trunk/src/series/time_series.m

    r880 r881  
    471471                DataOut.([VarName 'Histo'])(index,ind_start:ind_start+MaxIndex_new-MinIndex_new)=...
    472472                    DataOut.([VarName 'Histo'])(index,ind_start:ind_start+MaxIndex_new-MinIndex_new)+Field.([VarName 'Histo']);
    473                 VarVal=pdf2stat(Field.(VarName),Field.([VarName 'Histo']));% max of the current field
     473                VarVal=pdf2stat((Field.(VarName))',(Field.([VarName 'Histo']))');% max of the current field
    474474                for istat=1:numel(VarVal)
    475475                    DataOut.([VarName StatName{istat}])(index)=VarVal(istat);
     
    506506        DataOut.Time(index,1)=time(index);%
    507507    end
    508    
     508    index
    509509    % record the number of missing input fields
    510510    if ~isempty(errormsg)
Note: See TracChangeset for help on using the changeset viewer.