フィルターのクリア

How can I generate the Autocorrelation matrix of a vector of random variables?

19 ビュー (過去 30 日間)
Mohamad Al Hassan
Mohamad Al Hassan 2019 年 2 月 26 日
回答済み: Munish Raj 2019 年 3 月 1 日
Consider a vector containing random variables such as the following:
y=rand(10,1);
How can I evaluate the autocorrelation between all the components of the vector? I want to obtain the 10x10 autocorrelation matrix of the vector.

回答 (1 件)

Munish Raj
Munish Raj 2019 年 3 月 1 日
Hello Mohamad,
MATLAB’s auto correlation function can be used for this purpose.
The documentation for the autocorrelation can be found here.
The following is a sample code on how you would use it
y=rand(10,1); %derfine a random vector
[acf,lags,bounds] = autocorr(y) %autocorrelate the vector
plot(acf) %plots the autocorrelated vector

カテゴリ

Help Center および File ExchangeCalendar についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by