Lab 6
Lab 6
Objective
In this lab we will be able:
To compute auto and cross correlation using matlab
Introduction
Correlation is a statistical technique that is used to measure the similarity between two
signals. In the case of discrete signals, the correlation is calculated as the inner product
of two signals, where the signals are time-shifted versions of each other. The correlation
coefficient ranges from -1 to 1, where a value of 1 indicates a perfect correlation, a
value of 0 indicates no correlation, and a value of -1 indicates a perfect anti-correlation.
Procedure
In Matlab, there are two main functions that can be used to calculate the correlation of
two discrete signals: xcorr and corrcoef. The xcorr function calculates the cross-
correlation of two signals, while the corrcoef function calculates the correlation
coefficient of two signals. where x and y are the two signals to be correlated, maxlag is
the maximum lag value (default is the length of the input signals), and r is the correlation
values and lag is the lag values of the correlation values.
Lab Task