nncorr
(To be removed) Cross correlation between neural network time series
nncorr will be removed in a future release. For more information,
see Transition Legacy Neural Network Code to dlnetwork Workflows.
For advice on updating your code, see Version History.
Syntax
nncorr(a,b,maxlag,'flag')
Description
nncorr(a,b,maxlag,' takes these
arguments, flag')
a | Matrix or cell array, with columns interpreted as timesteps, and having a
total number of matrix rows of |
b | Matrix or cell array, with columns interpreted as timesteps, and having a
total number of matrix rows of |
maxlag | Maximum number of time lags |
flag | Type of normalization (default =
|
and returns an N-by-M cell array where each
{i,j} element is a 2*maxlag+1 length row vector formed
from the correlations of a elements (i.e., matrix row) i
and b elements (i.e., matrix column) j.
If a and b are specified with row vectors, the
result is returned in matrix form.
The options for the normalization flag are:
'biased'— scales the raw cross-correlation by 1/N.'unbiased'— scales the raw correlation by1/(N-abs(k)), wherekis the index into the result.'coeff'— normalizes the sequence so that the correlations at zero lag are 1.0.'none'— no scaling. This is the default.
Examples
Here the autocorrelation of a random 1-element, 1-sample, 20-timestep signal is calculated with a maximum lag of 10.
a = nndata(1,1,20) aa = nncorr(a,a,10)
Here the cross-correlation of the first signal with another random 2-element signal are found, with a maximum lag of 8.
b = nndata(2,1,20) ab = nncorr(a,b,8)