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