Changeset 243 for trunk/src/pivlab.m


Ignore:
Timestamp:
Apr 19, 2011, 5:41:35 PM (13 years ago)
Author:
sommeria
Message:

bug repair in uvmat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/pivlab.m

    r238 r243  
    136136    if y <= npy-1 && y >= 1
    137137        f0 = log(result_conv(y,x));
    138         f1 = log(result_conv(y-1,x));
    139         f2 = log(result_conv(y+1,x));
     138        f1 = real(log(result_conv(y-1,x)));
     139        f2 = real(log(result_conv(y+1,x)));
    140140        peaky = peaky+ (f1-f2)/(2*f1-4*f0+2*f2);
    141141    else
     
    145145    if x <= npx-1 && x >= 1
    146146        f0 = log(result_conv(y,x));
    147         f1 = log(result_conv(y,x-1));
    148         f2 = log(result_conv(y,x+1));
     147        f1 = real(log(result_conv(y,x-1)));
     148        f2 = real(log(result_conv(y,x+1)));
    149149        peakx = peakx+ (f1-f2)/(2*f1-4*f0+2*f2);
    150150    else
Note: See TracChangeset for help on using the changeset viewer.