Changeset 731
 Timestamp:
 Mar 10, 2014, 1:03:20 PM (10 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/series/civ_series.m
r724 r731 914 914 F=0; 915 915 [npy,npx]=size(result_conv); 916 917 % if (x <= (size(result_conv,1)1)) && (y <= (size(result_conv,1)1)) && (x >= 1) && (y >= 1) 918 %the following 8 lines are copyright (c) 1998, Uri Shavit, Roi Gurka, Alex Liberzon, Technion ï¿œ Israel Institute of Technology 919 %http://urapiv.wordpress.com 920 peaky = y; 921 if y <= npy1 && y >= 1 922 f0 = log(result_conv(y,x)); 923 f1 = real(log(result_conv(y1,x))); 924 f2 = real(log(result_conv(y+1,x))); 925 peaky = peaky+ (f1f2)/(2*f14*f0+2*f2); 926 else 927 F=2; % warning flag for vector truncated by the limited search box 928 end 929 peakx=x; 930 if x <= npx1 && x >= 1 931 f0 = log(result_conv(y,x)); 932 f1 = real(log(result_conv(y,x1))); 933 f2 = real(log(result_conv(y,x+1))); 934 peakx = peakx+ (f1f2)/(2*f14*f0+2*f2); 935 else 936 F=2; % warning flag for vector truncated by the limited search box 937 end 938 vector=[peakxfloor(npx/2)1 peakyfloor(npy/2)1]; 916 result_conv(result_conv<1)=1; %set to 1 correlation values smaller than 1 (to avoid divergence in the log) 917 %the following 8 lines are copyright (c) 1998, Uri Shavit, Roi Gurka, Alex Liberzon, Technion ï¿œ Israel Institute of Technology 918 %http://urapiv.wordpress.com 919 peaky = y; 920 if y <= npy1 && y >= 1 921 f0 = log(result_conv(y,x)); 922 f1 = log(result_conv(y1,x)); 923 f2 = log(result_conv(y+1,x)); 924 peaky = peaky+ (f1f2)/(2*f14*f0+2*f2); 925 else 926 F=2; % warning flag for vector truncated by the limited search box 927 end 928 peakx=x; 929 if x <= npx1 && x >= 1 930 f0 = log(result_conv(y,x)); 931 f1 = log(result_conv(y,x1)); 932 f2 = log(result_conv(y,x+1)); 933 peakx = peakx+ (f1f2)/(2*f14*f0+2*f2); 934 else 935 F=2; % warning flag for vector truncated by the limited search box 936 end 937 vector=[peakxfloor(npx/2)1 peakyfloor(npy/2)1]; 939 938 940 939 % … … 946 945 peaky=y; 947 946 peakx=x; 947 result_conv(result_conv<1)=1; %set to 1 correlation values smaller than 1 (to avoid divergence in the log) 948 948 [npy,npx]=size(result_conv); 949 949 if (x <= npx1) && (y <= npy1) && (x >= 1) && (y >= 1)
Note: See TracChangeset
for help on using the changeset viewer.