Changeset 554 for trunk/src/series.m
 Timestamp:
 Oct 17, 2012, 10:36:43 PM (11 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

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
Note: See TracChangeset
for help on using the changeset viewer.