Changeset 1084 for trunk


Ignore:
Timestamp:
Aug 10, 2020, 3:20:45 PM (4 years ago)
Author:
sommeria
Message:

various updates

Location:
trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_field.m

    r1083 r1084  
    414414        set(handles.PanelVectors,'Visible','off')
    415415        set(handles.Coord_y,'Visible','on')
     416        set(handles.Coord_y,'Max',2)%allow multiple selection
    416417        set(handles.Y_title,'Visible','on')
    417418        set(handles.Coord_z,'Visible','off')
    418419        set(handles.Z_title,'Visible','off')
    419         %ordinate_Callback(hObject, VarName, handles)       
     420        set(handles.Coord_x,'String',Field.Display.ListVarName')
     421        Coord_x_Callback(hObject, VarName, handles)
     422        %set(handles.Coord_y,'String',Field.Display.ListVarName')
     423        %Coord_x_Callback(hObject, VarName, handles)       
    420424    case {'scalar'}
    421425        set(handles.Coordinates,'Visible','on')
     
    502506end
    503507
    504 %NOT USED : TO DELETE------------------------------------------------------------------------
    505 function ordinate_Callback(hObject, DimCell, handles)
     508
     509function set_coord_y_options(handles,VarName)
    506510%------------------------------------------------------------------------
    507511Field=get(handles.get_field,'UserData');
    508 y_index=get(handles.ordinate,'Value');
    509 y_menu=get(handles.ordinate,'String');
    510 if isempty(y_menu)
    511     return
    512 else
    513 YName=y_menu{y_index};
    514 end
     512VarIndex=find(strcmp(VarName,Field.Display.ListVarName),1);
     513DimCell=Field.Display.VarDimName{VarIndex};
     514% y_index=get(handles.Coord_y,'Value');
     515% y_menu=get(handles.Coord_y,'String');
     516% if isempty(y_menu)
     517%     return
     518% else
     519% YName=y_menu{y_index};
     520% end
    515521
    516522%% set list of possible coordinates
    517 test_component=zeros(size(Field.Display.VarDimName));%=1 when variable #ilist is eligible as unstructured coordinate
     523% test_component=zeros(size(Field.Display.VarDimName));%=1 when variable #ilist is eligible as unstructured coordinate
    518524test_coord=zeros(size(Field.Display.VarDimName)); %=1 when variable #ilist is eligible as structured coordiante
    519 ListCoord={''};
    520 dim_var=Field.Display.VarDimName{y_index};%list of dimensions of the selected variable
     525% ListCoord={''};
     526% dim_var=Field.Display.VarDimName{y_index};%list of dimensions of the selected variable
    521527
    522528for ilist=1:numel(Field.Display.VarDimName)
    523529    dimnames=Field.Display.VarDimName{ilist}; %list of dimensions for variable #ilist
    524     if isequal(dimnames,dim_var)
    525         test_component(ilist)=1;
    526     elseif numel(dimnames)==1 && ~isempty(find(strcmp(dimnames{1},dim_var)))%variable ilist is a 1D array which can be coordinate variable
     530    if isequal(dimnames,DimCell)||isequal(dimnames(1:end-1),DimCell)||isequal(dimnames(2:end),DimCell)
    527531        test_coord(ilist)=1;
    528532    end
    529533end
    530 var_component=find(test_component);% list of variable indices elligible as unstructured coordinates
    531 var_coord=find(test_coord);% % list of variable indices elligible as structured coordinates
    532 ListCoord=Field.Display.ListVarName([var_component var_coord]);
     534ListCoord=Field.Display.ListVarName(find(test_coord));
     535set(handles.Coord_y,'String',ListCoord)
     536val_y=1;
     537if strcmp(VarName,ListCoord{1})&& numel(ListCoord)>=2
     538    val_y=2;
     539end
     540set(handles.Coord_y,'Value',val_y)
    533541
    534542%% set default coord selection
    535 if numel(find(test_coord))>3
    536      SwitchVarIndexTime=get(handles.SwitchVarIndexTime,'String');
    537     if numel(SwitchVarIndexTime)<3
    538         SwitchVarIndexTime=[SwitchVarIndexTime;'matrix_index'];
    539         set(handles.SwitchVarIndexTime,'String',SwitchVarIndexTime)
    540     end
    541     set(handles.SwitchVarIndexTime,'Value',3)% the last dim must be considered as time
    542     SwitchVarIndexTime_Callback([], [], handles)
    543 end
    544 if numel(var_component)<2
    545     if numel(test_coord)<2
    546         ListCoord={''};
    547     else
    548         set(handles.Coord_x,'Value',2)
    549         set(handles.Coord_y,'Value',1)
    550     end
    551 else
    552     coord_val=1;
    553     for ilist=1:numel(var_component)
    554         ivar=var_component(ilist);
    555         if isfield(Field.Display,'VarAttribute') && numel(Field.Display.VarAttribute)>=ivar && isfield(Field.Display.VarAttribute{ivar},'Role')
    556             Role=Field.Display.VarAttribute{ivar}.Role;
    557             if strcmp(Role,'coord_x')
    558                 coord_val=ilist;
    559             end
    560         end
    561     end
    562     set(handles.Coord_x,'Value',coord_val+1)
    563 end
    564 set(handles.Coord_x,'String',[{''}; ListCoord])
    565 
    566 
    567 %% set list of time coordinates
    568 menu=get(handles.SwitchVarIndexTime,'String');
    569 TimeOption=menu{get(handles.SwitchVarIndexTime,'Value')};
    570 switch TimeOption
    571     case 'variable'
    572         if numel(find(test_coord))<3
    573             ListTime={''};
    574         else
    575             ListTime=Field.Display.ListVarName(find(test_coord,end));
    576         end
    577         set(handles.TimeName,'Value',1)
    578         set(handles.TimeName,'String',ListTime)
    579     case 'matrix index'
    580         if numel(find(test_coord))<3
    581             ListTime={''};
    582         else
    583             ListTime=Field.Display.VarDimName{find(test_coord,end)};
    584         end
    585         set(handles.TimeName,'Value',1)
    586         set(handles.TimeName,'String',ListTime)
    587 end 
    588 if ~ischar(DimCell)
    589 update_field(handles,YName)
    590 end
     543% if numel(find(test_coord))>3
     544%      SwitchVarIndexTime=get(handles.SwitchVarIndexTime,'String');
     545%     if numel(SwitchVarIndexTime)<3
     546%         SwitchVarIndexTime=[SwitchVarIndexTime;'matrix_index'];
     547%         set(handles.SwitchVarIndexTime,'String',SwitchVarIndexTime)
     548%     end
     549%     set(handles.SwitchVarIndexTime,'Value',3)% the last dim must be considered as time
     550%     SwitchVarIndexTime_Callback([], [], handles)
     551% end
     552% if numel(var_component)<2
     553%     if numel(test_coord)<2
     554%         ListCoord={''};
     555%     else
     556%         set(handles.Coord_x,'Value',2)
     557%         set(handles.Coord_y,'Value',1)
     558%     end
     559% else
     560%     coord_val=1;
     561%     for ilist=1:numel(var_component)
     562%         ivar=var_component(ilist);
     563%         if isfield(Field.Display,'VarAttribute') && numel(Field.Display.VarAttribute)>=ivar && isfield(Field.Display.VarAttribute{ivar},'Role')
     564%             Role=Field.Display.VarAttribute{ivar}.Role;
     565%             if strcmp(Role,'coord_x')
     566%                 coord_val=ilist;
     567%             end
     568%         end
     569%     end
     570%     set(handles.Coord_x,'Value',coord_val+1)
     571% end
     572% set(handles.Coord_x,'String',[{''}; ListCoord])
     573
     574
     575% %% set list of time coordinates
     576% menu=get(handles.SwitchVarIndexTime,'String');
     577% TimeOption=menu{get(handles.SwitchVarIndexTime,'Value')};
     578% switch TimeOption
     579%     case 'variable'
     580%         if numel(find(test_coord))<3
     581%             ListTime={''};
     582%         else
     583%             ListTime=Field.Display.ListVarName(find(test_coord,end));
     584%         end
     585%         set(handles.TimeName,'Value',1)
     586%         set(handles.TimeName,'String',ListTime)
     587%     case 'matrix index'
     588%         if numel(find(test_coord))<3
     589%             ListTime={''};
     590%         else
     591%             ListTime=Field.Display.VarDimName{find(test_coord,end)};
     592%         end
     593%         set(handles.TimeName,'Value',1)
     594%         set(handles.TimeName,'String',ListTime)
     595% end 
     596% if ~ischar(DimCell)
     597% update_field(handles,YName)
     598% end
    591599         
    592600%------------------------------------------------------------------------
     
    672680set(handles.Coord_y,'Value',coord_val(2))
    673681set(handles.Coord_y,'String',ListCoord)
    674 if numel(coord_val)>=3
     682if numel(find(coord_val))>=3
    675683    set(handles.Coord_z,'Value',coord_val(3))
    676684    set(handles.Coord_z,'String',ListCoord)
     
    873881%------------------------------------------------------------------------
    874882function Coord_x_Callback(hObject, DimCell, handles)
    875 
     883DimCell
    876884index=get(handles.Coord_x,'Value');
    877885string=get(handles.Coord_x,'String');
    878886VarName=string{index};
    879887if ~ischar(DimCell)
    880 update_field(handles,VarName)
    881 end
     888    update_field(handles,VarName)
     889end
     890if isequal(get(handles.FieldOption,'Value'),1)
     891set_coord_y_options(handles,VarName)
     892end
     893
    882894%------------------------------------------------------------------------
    883895% --- Executes on selection change in Coord_y.
     
    964976
    965977%-----------------------------------------------------------------------
     978% update the display of the variable 'VarName' and its dimensions in the list of variables
    966979function update_field(handles,VarName)
    967980%-----------------------------------------------------------------------
  • trunk/src/proj_field.m

    r1080 r1084  
    16231623                    [X,Y]=meshgrid(Coord{2},Coord{1});%initial coordinates
    16241624                    %name of error flag variable
    1625                     FFName='FF';%default name (if not already used)
    1626                     if isfield(ProjData,'FF')
    1627                         ind=1;
    1628                         while isfield(ProjData,['FF_' num2str(ind)])
    1629                             ind=ind+1;
    1630                         end
    1631                         FFName=['FF_' num2str(ind)];% append an index to the name of error flag, FF_1,FF_2...
    1632                     end
     1625%                     FFName='FF';%default name (if not already used)
     1626%                     if isfield(ProjData,'FF')
     1627%                         ind=1;
     1628%                         while isfield(ProjData,['FF_' num2str(ind)])
     1629%                             ind=ind+1;
     1630%                         end
     1631%                         FFName=['FF_' num2str(ind)];% append an index to the name of error flag, FF_1,FF_2...
     1632%                     end
    16331633                    % project all variables in the cell
    16341634                    for ivar=VarIndex
     
    16531653                            VarAttribute{length(ListVarName)+nbcoord}=FieldData.VarAttribute{ivar};
    16541654                        end
    1655                         ProjData.(FFName)=isnan(ProjData.(VarName));%detact NaN (points outside the interpolation range)
    1656                         ProjData.(VarName)(ProjData.(FFName))=0; %set to 0 the NaN data
     1655%                         ProjData.(FFName)=isnan(ProjData.(VarName));%detact NaN (points outside the interpolation range)
     1656%                         ProjData.(VarName)(ProjData.(FFName))=0; %set to 0 the NaN data
    16571657                    end
    16581658                    %update list of variables with error flag
    1659                     ListVarName=[ListVarName FFName];
    1660                     VarDimName=[VarDimName {DimCell}];
    1661                     VarAttribute{numel(ListVarName)}.Role='errorflag';
     1659%                     ListVarName=[ListVarName FFName];
     1660%                     VarDimName=[VarDimName {DimCell}];
     1661%                     VarAttribute{numel(ListVarName)}.Role='errorflag';
    16621662                elseif ~testangle % 3Dcase without change of angle
    16631663                    % unstructured z coordinate
  • trunk/src/series.m

    r1078 r1084  
    33283328    DataOut=feval(transform_handle,Field,ParamIn);% execute the transform fct to get the required conditions
    33293329    Field.Action.RUN=0; % indicate that the transform fct is called only to get input param
    3330     DataOut=feval(transform_handle,Field,[]); % execute the transform fct to get the required conditions
     3330    %DataOut=feval(transform_handle,Field,[]); % execute the transform fct to get the required conditions
    33313331    if isfield(DataOut,'TransformInput')%  used to add transform parameters at selection of the transform fct
    33323332        SeriesData.TransformInput=DataOut.TransformInput;
  • trunk/src/series/merge_proj.m

    r1078 r1084  
    289289        [Data{iview},tild,errormsg] = read_field(filecell{iview,index},FileType{iview},ParamIn{iview},frame_index{iview}(index));
    290290        if isempty(errormsg)
    291             disp([filecell{iview,index} ' read'])
     291            disp([filecell{iview,index} ' read OK'])
    292292        else
    293293            disp_uvmat('ERROR',['ERROR in merge_proj/read_field/' errormsg],checkrun)
  • trunk/src/transform_field/phys_polar.m

    r1081 r1084  
    4949%% request input parameters
    5050if isfield(DataIn,'Action') && isfield(DataIn.Action,'RUN') && isequal(DataIn.Action.RUN,0)
    51     prompt = {'origin [x y] of polar coordinates';'reference radius';'reference angle(degrees)'};
     51    prompt = {'origin [x y] of polar coordinates';'reference radius';'reference angle(degrees)';'angle direction and switch x y(+/-)'};
    5252    dlg_title = 'set the parameters for the polar coordinates';
    5353    num_lines= 2;
    54     def     = { '[0 0]';'0';'0'};
     54    def     = { '[0 0]';'0';'0';'+'};
    5555    if isfield(XmlData,'TransformInput')
    5656        if isfield(XmlData.TransformInput,'PolarCentre')
     
    6262        if isfield(XmlData.TransformInput,'PolarReferenceAngle')
    6363            def{3}=num2str(XmlData.TransformInput.PolarReferenceAngle);
     64        end
     65        if isfield(XmlData.TransformInput,'PolarAngleDirection')
     66            def{4}=XmlData.TransformInput.PolarAngleDirection;
    6467        end
    6568    end
     
    6871    Data.TransformInput.PolarReferenceRadius=str2num(answer{2});
    6972    Data.TransformInput.PolarReferenceAngle=str2num(answer{3});
    70 %     if isfield(XmlData,'GeometryCalib')&& isfield(XmlData.GeometryCalib,'CoordUnit')
    71 %         Data.CoordUnit=XmlData.GeometryCalib.CoordUnit;% states that the output is in unit defined by GeometryCalib, then erased all projection objects with different units
    72 %     end
     73    Data.TransformInput.PolarAngleDirection=answer{4};
    7374    return
    7475end
     
    136137        angle_offset=(pi/180)*XmlData.TransformInput.PolarReferenceAngle; %offset angle (in unit of the final angle, degrees or arc length along the reference radius))
    137138    end
     139    check_reverse=isfield(XmlData.TransformInput,'PolarAngleDirection')&& strcmp(XmlData.TransformInput.PolarAngleDirection,'-');
    138140end
    139141
    140142%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    141143%% get fields
    142 check_scalar=0;
    143 check_vector=0;
     144
    144145nbvar=0;%counter for the number of output variables
    145146nbcoord=0;%counter for the number of variables for radial coordiantes (case of multiple field inputs)
     
    163164        ZIndex=0;
    164165    end
     166    check_scalar=zeros(1,numel(CellInfo));
     167    check_vector=zeros(1,numel(CellInfo));
    165168    for icell=1:numel(CellInfo)
    166169        if NbDim(icell)==2
     
    252255                    Data.VarDimName=[Data.VarDimName {radius_name} {theta_name}];
    253256                    nbvar=nbvar+2;
     257                    if check_reverse
     258                                            Data.VarAttribute{nbvar-1}.Role='coord_y';
     259                    Data.VarAttribute{nbvar}.Role='coord_x';
     260                    else
    254261                    Data.VarAttribute{nbvar-1}.Role='coord_x';
    255262                    Data.VarAttribute{nbvar}.Role='coord_y';
     263                    end
    256264                    check_unit=1;
    257265                    if isfield(DataCell{ifield},'CoordUnit')
     
    315323    [A,Data.radius,Data.theta]=phys_Ima_polar(A,coord_x,coord_y,Calib_new,ZInd,origin_xy,radius_offset,angle_offset,angle_scale);
    316324    for icell=1:numel(A)
    317         if icell<=numel(A)-1 && check_vector(icell)==1 && check_vector(icell+1)==1   %transform u,v into polar coordiantes
     325        if icell<=numel(A)-1 && check_vector(icell)==1 && check_vector(icell+1)==1   %transform u,v into polar coordinates
    318326            theta=Data.theta/angle_scale-angle_offset;
    319327            [~,Theta]=meshgrid(Data.radius,theta);%grid in physical coordinates
    320328            U_r_name= rename_indexing(U_r_name,Data.ListVarName);
    321             U_theta_name= rename_indexing(U_theta_name,Data.ListVarName);
    322             Data.ListVarName=[Data.ListVarName {U_r_name,U_theta_name}];
    323             Data.VarDimName=[Data.VarDimName {{theta_name,radius_name}} {{theta_name,radius_name}}];
    324             Data.(U_r_name)=A{icell}.*cos(Theta)+A{icell+1}.*sin(Theta);%radial velocity
    325             Data.(U_theta_name)=(-A{icell}.*sin(Theta)+A{icell+1}.*cos(Theta));%./(Data.X)%+radius_ref);% azimuthal velocity component
     329            U_theta_name= rename_indexing(U_theta_name,Data.ListVarName);       
     330                Data.(U_r_name)=A{icell}.*cos(Theta)+A{icell+1}.*sin(Theta);%radial velocity
     331                Data.(U_theta_name)=(-A{icell}.*sin(Theta)+A{icell+1}.*cos(Theta));% azimuthal velocity component
     332            if check_reverse
     333                Data.(U_theta_name)=(Data.(U_theta_name))';
     334                Data.(U_r_name)=Data.(U_r_name)';
     335                Data.ListVarName=[Data.ListVarName {U_theta_name,U_r_name}];
     336                Data.VarDimName=[Data.VarDimName {{radius_name,theta_name}} {{radius_name,theta_name}}];
     337            else
     338                Data.ListVarName=[Data.ListVarName {U_r_name,U_theta_name}];
     339                Data.VarDimName=[Data.VarDimName {{theta_name,radius_name}} {{theta_name,radius_name}}];
     340            end
    326341        elseif ~check_vector(icell)% for scalar fields
    327342            FieldName{icell}= rename_indexing(FieldName{icell},Data.ListVarName);
    328             Data.ListVarName=[Data.ListVarName {FieldName{icell}}];
    329             Data.VarDimName=[Data.VarDimName {{theta_name,radius_name}}];
    330             Data.(FieldName{icell})=A{icell};
    331         end
    332     end
     343            Data.ListVarName=[Data.ListVarName FieldName(icell)];       
     344            if check_reverse
     345                Data.(FieldName{icell})=A{icell}';
     346                Data.VarDimName=[Data.VarDimName {{radius_name,theta_name}}];
     347            else
     348                Data.VarDimName=[Data.VarDimName {{theta_name,radius_name}}];
     349                Data.(FieldName{icell})=A{icell};
     350            end
     351        end
     352    end
     353end
     354if check_reverse
     355    Data.(theta_name)=-Data.(theta_name);
    333356end
    334357
     
    406429radius=Min_r:Dr:Max_r;% polar coordinates for projections
    407430theta=Min_theta:Dtheta:Max_theta;
     431%theta=Max_theta:-Dtheta:Min_theta;
    408432[Radius,Theta]=meshgrid(radius,theta/angle_scale);%grid in polar coordinates (angles in radians)
    409433%transform X, Y in cartesian
     
    436460    Dy=(coord_y{icell}(end)-coord_y{icell}(1))/(npy(icell)-1);
    437461    indx_ima=1+round((XIMA-coord_x{icell}(1))/Dx);%indices of the initial matrix close to the points of the new grid
    438     indy_ima=1+round((YIMA-coord_y{icell}(1))/Dy);
    439     Delta_x=1+(XIMA-coord_x{icell}(1))/Dx-indx_ima;%
    440     Delta_y=1+(YIMA-coord_y{icell}(1))/Dy-indy_ima;
     462    %indy_ima=1+round((YIMA-coord_y{icell}(1))/Dy);
     463    indy_ima=1+round((coord_y{icell}(end)-YIMA)/Dy);
     464     Delta_x=1+(XIMA-coord_x{icell}(1))/Dx-indx_ima;%error in the index discretisation
     465     Delta_y=1+(coord_y{icell}(end)-YIMA)/Dy-indy_ima;
    441466    XIMA=reshape(indx_ima,1,[]);%indices reorganized in 'line'
    442467    YIMA=reshape(indy_ima,1,[]);%indices reorganized in 'line'
     
    450475        ind_in=find(flagin);
    451476        ind_out=find(~flagin);
    452         ICOMB=((XIMA-1)*npy(icell)+(npy(icell)+1-YIMA));
     477        ICOMB=((XIMA-1)*npy(icell)+(npy(icell)+1-YIMA));% indices in vec_A
    453478        ICOMB=ICOMB(flagin);%index corresponding to XIMA and YIMA in the aligned original image vec_A
    454479        vec_B(ind_in)=vec_A(ICOMB);
    455480        vec_B(ind_out)=zeros(size(ind_out));
    456481        A_out{icell}=reshape(vec_B,np_theta,np_r);%new image in real coordinates
    457         DA_y=circshift(A_out{icell},-1,1)-A_out{icell};
     482        DA_y=circshift(A_out{icell},-1,1)-A_out{icell};% derivative
    458483        DA_y(end,:)=0;
    459484        DA_x=circshift(A_out{icell},-1,2)-A_out{icell};
  • trunk/src/uigetfile_uvmat.m

    r1071 r1084  
    9393    uicontrol('Style','pushbutton','Tag','refresh','Units','normalized','Position', [0.36 0.77 0.2 0.05],'Callback',@refresh_GUI,...
    9494        'String','Refresh','FontWeight','bold','FontUnits','points','FontSize',12);
    95     uicontrol('Style','popupmenu','Units','normalized', 'Position', [0.75 0.74 0.23 0.05],'tag','sort_option','Callback',@refresh_GUI,'Visible','off',...
     95    uicontrol('Style','popupmenu','Units','normalized', 'Position', [0.75 0.74 0.23 0.05],'tag','sort_option','Callback',@refresh_GUI,'Visible','on',...
    9696        'String',{'sort name';'sort date'},'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''sort_option'': sort the files by names or dates');
    9797    uicontrol('Style','listbox','Units','normalized', 'Position',[0.02 0.08 0.96 0.66], 'Callback', @(src,event)list_Callback(option,FilterExt,src,event),'tag','list',...
     
    102102    close_button=uicontrol('Style','pushbutton','Units','normalized', 'Position', [0.78 0.005 0.2 0.07],'Callback',@(src,event)close(option,src,event),...
    103103        'FontWeight','bold','FontUnits','points','FontSize',12);
    104     %set(hrefresh,'UserData',StatusData)
    105104    if strcmp(option,'status_display') %put a run advancement display
    106105        set(hfig,'DeleteFcn',@(src,event)close(option,src,event))
    107106        uicontrol('Style','frame','Units','normalized', 'Position', [0.02 0.85 0.9 0.04]);
    108107        uicontrol('Style','frame','Units','normalized', 'Position',[0.02 0.85 0.01 0.04],'BackgroundColor',[1 0 0],'tag','waitbar');
    109         %             uicontrol('Style','text','Units','normalized', 'Position', [0.4 0.8 0.35 0.03],'BackgroundColor',BackgroundColor,...
    110         %             'String','sort: ','FontUnits','points','FontSize',12,'FontWeight','bold','HorizontalAlignment','right');
    111108        delete(home_button)
    112109        set(OK_button,'String','Open')
     
    198195set(hObject,'backgroundColor',[0 1 0])% indicate end button activatio
    199196fig_struct=get(hObject,'parent');
    200 if isstruct(fig_struct);%recent Matlab
     197if isstruct(fig_struct)%recent Matlab
    201198uiresume(fig_struct.Number)
    202199else
     
    337334%-------------------------------------------------------------------------
    338335ListStruct=dir_uvmat(DirName);% get structure of the current directory
     336date_index=find(strcmp('datenum',fieldnames(ListStruct)));% find the index of the date displayin the list of fields
    339337NumFiles=0; %default
    340338if numel(ListStruct)<1  % case of empty dir
     
    363361    check_dir=check_dir(check_keep);
    364362end
    365 check_emptydate=cellfun('isempty',ListCells(5,:));% = 1 if datenum undefined
    366 ListCells(5,find(check_emptydate))={0}; %set to 0 the empty dates
    367 ListDates=cell2mat(ListCells(5,:));%list of numerical dates
     363check_emptydate=cellfun('isempty',ListCells(date_index,:));% = 1 if datenum undefined
     364ListCells(date_index,find(check_emptydate))={0}; %set to 0 the empty dates
     365ListDates=cell2mat(ListCells(date_index,:));%list of numerical dates
    368366if isnumeric(sort_option)
    369367    check_old=ListDates<sort_option-1;% -1 is put to account for a 1 s delay in the record of starting time
     
    384382ListFiles=[{'+/..'} ListFiles(check_keep)];
    385383if check_date
    386     ListDateString=ListCells(2,:);%list of file dates
     384    ListDateString=ListCells(3,:);%list of file dates
    387385    if isnumeric(sort_option)
    388386        ListDateString(check_old)={'--OLD--'};
Note: See TracChangeset for help on using the changeset viewer.