| DSP Blockset | ![]() |
Compute the autocorrelation of a vector input
Library
Description
The Autocorrelation block computes the autocorrelation of each channel in an input matrix or vector, u. The block computes the autocorrelation along each column of a frame-based input, and computes along the vector dimension of a sample-based vector input. The block does not accept sample-based matrix inputs. Outputs are always sample based.
M-by-N matrix inputs must be frame based. The result, y, is a sample-based (l+1)-by-N matrix whose jth column has elements
where * denotes the complex conjugate, and l represents the maximum lag. Note that y1,j is the zero-lag element in the jth column. When Compute all non-negative lags is selected, l=M. Otherwise, l is specified as a nonnegative integer by the Maximum non-negative lag (less than input length) parameter.
Input u is zero when indexed outside of its valid range. When the input is real, the output is real; otherwise, the output is complex.
If the input is a sample-based vector (row, column, or 1-D), the output is sample based, with the same shape as the input and length l+1. The block computes the autocorrelation of sample-based vector inputs along the vector dimensions. The Autocorrelation block does not accept a sample-based full-dimension matrix input.
The Autocorrelation block accepts both real and complex floating-point inputs. It also accepts real fixed-point inputs.
Fixed-Point Data Types
The following diagram shows the data types used within the Autocorrelation block for fixed-point signals.
You can set the product output, accumulator, and output data types in the block mask as discussed below.
Dialog Box
0, length(input)-1].
None -- Generates the raw autocorrelation, yi,j, without normalization
Biased -- Generates the biased estimate of the autocorrelation
Unity at zero-lag -- Normalizes the estimate of the autocorrelation for each channel so that the zero-lag sum is identically 1
None for fixed-point signals. Tunable, except in the Simulink external mode.
Time -- The block computes in the time domain, which minimizes memory use
Frequency -- The block computes in the frequency domain, which may require fewer computations than computing in the time domain, depending on the input length
Time for fixed-point signals.
Same as input, these characteristics will match those of the input to the block. If you select User-defined, the Output word length and Output fraction length parameters become visible.
User-defined is specified for the Fixed-point output attributes parameter.
User-defined is specified for the Fixed-point output attributes parameter.

Same as output, the accumulator word and fraction lengths are the same as those of the output of the block. If you select User-defined, the Accumulator word length and Accumulator fraction length parameters become visible.
User-defined is specified for the Fixed-point accumulator attributes parameter.
User-defined is specified for the Fixed-point accumulator attributes parameter.

Same as accumulator, the product output word and fraction lengths are the same as those of the accumulator of the block. If you select Same as output, they are the same as those of the output of the block. If you select User-defined, the Product output word length and Product output fraction length parameters become visible.
User-defined is specified for the Fixed-point product output attributes parameter.
User-defined is specified for the Fixed-point product output attributes parameter.
Supported Data Types
To learn how to convert your data types to the above data types in MATLAB and Simulink, see Supported Data Types and How to Convert to Them.
See Also
| Correlation |
DSP Blockset |
xcorr |
Signal Processing Toolbox |
| Analytic Signal | Autocorrelation LPC | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |