dawn@0: % prd=dftoperiod2(d,b,t) - estimate period from difference function dawn@0: % dawn@0: % prd: row matrix of period estimates dawn@0: % dawn@0: % d: column vector or matrix of difference functions dawn@0: % b: bounds matrix ([lo, hi]) dawn@0: % t: threshold dawn@0: % dawn@0: % Difference functions are supposed to be cumulative-mean-normalized. dawn@0: % For each column of d, search for the first minimum between lo and hi that dawn@0: % falls below threshold. The index of this minimum (re 0) dawn@0: % is the period estimate. dawn@0: % dawn@0: % This version differs from dftoperiod in that the threshold is dawn@0: % incremented by the global minimum of the difference function. dawn@0: % dawn@0: % Mex function.