|
|
| File Information |
| Description |
Calculates the process autocovariance of an autoregressive model.
USAGE:
C=armodelcov(a)
a: A row vector with AR coefficients.
The notation follows that of other matlab functions such as arburg & filter.
Note: this notation is different from what is commonly found in textbooks
(sign is different and the length is one longer)
x(t)=sum(-a(2:end).*x(t-(1:length(a)-1)))+randn;
C: autocovariance matrix of same order as the ar model.
Assumes that the noise term is IID gaussian noise (zero mean, unit stddev)
EXAMPLE:
------------
a=[1.0 -0.5 0.2 -0.0 -0.0 0.2 -0.5];
n=length(a)-1;
C_theory=armodelcov(a);
C_theory=C_theory(:,1)'
%generate noise according to the ar model and check what kind of autocov. it has.
noise=filter(1,a,randn(10000,1));
noise(1:100)=[]; %cut away edge effects.
C_noise=xcov(noise,7,'unbiased')';
C_noise(1:n)=[] |
| MATLAB release |
MATLAB 7 (R14)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Updates |
| 30 Jun 2008 |
use \ instead of inv |
|
MATLAB Central Terms of Use
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.
Contact us at files@mathworks.com