Changeset 554
Legend:
 Unmodified
 Added
 Removed

trunk/src/find_file_series.m
r512 r554 190 190 end 191 191 end 192 if i1==0 193 i1=1;% set index 0 to 1 to distinguish from the absent index (set to 0) 194 end 195 if j1==0 196 j1=1;% set index 0 to 1 to distinguish from the absent index (set to 0) 197 end 192 198 i1_series(ref_i+1,ref_j+1,nb_pairs+1)=i1; 193 199 if ~isempty(i2_input) 
trunk/src/series.m
r553 r554 593 593 594 594 %% display the min and max indices for the file series 595 if size(i1_series,2)== 1595 if size(i1_series,2)==2 && min(min(i1_series(:,1,:)))==0 596 596 MinIndex_j=1; 597 MaxIndex_j=1; 598 MinIndex_i= min(find(i1_series));599 MaxIndex_i= max(find(i1_series));600 else 601 pair_max=squeeze(max(i1_series,[],1)); %max on pair index602 j_max=max(pair_max,[],1);603 %i_sum=sum(sum(i1_series,2),1);%sum of i1_series on the last index604 MaxIndex_i=max(find(j_max))1;% max ref index i605 MinIndex_i=min(find(j_max))1;% min ref index i606 diff_i_max=diff(j_max);597 MaxIndex_j=1; 598 MinIndex_i=find(i1_series(:,2,:), 1 )1; 599 MaxIndex_i=find(i1_series(:,2,:), 1, 'last' )1; 600 else 601 pair_max=squeeze(max(i1_series,[],1)); %max on pair index 602 j_max=max(pair_max,[],1); 603 %i_sum=sum(sum(i1_series,2),1);%sum of i1_series on the last index 604 MaxIndex_i=find(j_max, 1, 'last' )1;% max ref index i 605 MinIndex_i=find(j_max, 1 )1;% min ref index i 606 diff_i_max=diff(j_max); 607 607 if isequal (diff_i_max,diff_i_max(1)*ones(size(diff_i_max))) 608 608 set(handles.num_incr_i,'String',num2str(diff_i_max(1))) 609 609 end 610 i_max=max(pair_max,[],2);611 MaxIndex_j=max(find(i_max))1;% max ref index i612 MinIndex_j=min(find(i_max))1;% min ref index i613 diff_j_max=diff(i_max);610 i_max=max(pair_max,[],2); 611 MaxIndex_j=max(find(i_max))1;% max ref index i 612 MinIndex_j=min(find(i_max))1;% min ref index i 613 diff_j_max=diff(i_max); 614 614 if isequal (diff_j_max,diff_j_max(1)*ones(size(diff_j_max))) 615 615 set(handles.num_incr_j,'String',num2str(diff_j_max(1))) … … 618 618 MinIndex=get(handles.MinIndex,'Data');%retrieve the min indices in the table MinIndex 619 619 MaxIndex=get(handles.MaxIndex,'Data');%retrieve the max indices in the table MaxIndex 620 if isequal(MinIndex_i,1) 621 MinIndex_i=0; 622 end 623 if isequal(MinIndex_j,1) 624 MinIndex_j=0; 625 end 620 626 MinIndex{iview,1}=MinIndex_i; 621 627 MinIndex{iview,2}=MinIndex_j; … … 743 749 TimeTable{iview,1}=time(MinIndex_i,MinIndex_j); 744 750 end 745 TimeTable{iview,2}=time(first_i,first_j); 746 TimeTable{iview,3}=time(last_i,last_j); 751 if size(time)>=[last_i last_j] 752 TimeTable{iview,2}=time(first_i,first_j); 753 TimeTable{iview,3}=time(last_i,last_j); 754 end 747 755 if size(time)>=[MaxIndex_i MaxIndex_j]; 748 TimeTable{iview,4}=time(MaxIndex_i,MaxIndex_j);756 TimeTable{iview,4}=time(MaxIndex_i,MaxIndex_j); 749 757 end 750 758 end 
trunk/src/uvmat.m
r552 r554 2295 2295 end 2296 2296 siz=size(UvData.XmlData{1}.Time); 2297 if ~isempty(num_i1)&& ~isempty(num_i2) &&siz(1)>=max(num_i1,num_i2) && siz(2)>=max(num_j1,num_j2)2297 if ~isempty(num_i1)&& ~isempty(num_i2) && num_i1>0 &&siz(1)>=max(num_i1,num_i2) && siz(2)>=max(num_j1,num_j2) 2298 2298 abstime=(UvData.XmlData{1}.Time(num_i1,num_j1)+UvData.XmlData{1}.Time(num_i2,num_j2))/2;%overset the time read from files 2299 2299 dt=(UvData.XmlData{1}.Time(num_i2,num_j2)UvData.XmlData{1}.Time(num_i1,num_j1));
Note: See TracChangeset
for help on using the changeset viewer.