function y_cum = cum2x (x,y, maxlag, nsamp, overlap, flag) %CUM2X Cross-covariance % y_cum = cum2x (x,y,maxlag, samp_seg, overlap, flag) % x,y - data vectors/matrices with identical dimensions % if x,y are matrices, rather than vectors, columns are % assumed to correspond to independent realizations, % overlap is set to 0, and samp_seg to the row dimension. % maxlag - maximum lag to be computed [default = 0] % samp_seg - samples per segment [default = data_length] % overlap - percentage overlap of segments [default = 0] % overlap is clipped to the allowed range of [0,99].