| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Signal Processing Toolbox |
| Contents | Index |
| Learn more about Signal Processing Toolbox |
ar_coeffs = aryule(data,order)
[ar_coeffs,NoiseVariance] = aryule(data,order)
[ar_coeffs,NoiseVariance,reflect_coeffs] = aryule(data,order)
ar_coeffs = aryule(data,order) returns the AR coefficients for the input data and model order. The elements of ar_coeffs are normalized by ar_coeffs(1). order is a positive integer that cannot exceed the length of the input data.
[ar_coeffs,NoiseVariance] = aryule(data,order) returns the estimated variance NoiseVariance of the white noise input.
[ar_coeffs,NoiseVariance,reflect_coeffs] = aryule(data,order) returns the reflection coefficients reflect_coeffs.
In an AR model of order p, the current output is a linear combination of the past p outputs plus a white noise input. The weights on the p past outputs minimize the mean-square prediction error of the autoregression. If y[n] is the current value of the output and x[n] is a zero-mean white noise input, the AR(p) model is:
![]()
The reflection coefficients are the partial autocorrelation coefficients scaled by (–1). The reflection coefficients indicate the time dependence between y[n] and y[n-k] after subtracting the prediction based on the intervening k-1 time steps.
Create an AR(4) process and estimate the coefficients:
A=[1 -2.7607 3.8106 -2.6535 0.9238]; % AR(4) coefficients y=filter(1,A,0.2*randn(1024,1)); %filter a white noise input to create AR(4) process ar_coeffs=aryule(y,4); %compare the results in ar_coeffs to the vector A.
Estimate model order using decay of reflection coefficients:
y=filter(1,[1 -0.75 0.5],0.2*randn(1024,1));
%create AR(2) process
[ar_coeffs,NoiseVariance,reflect_coeffs]=aryule(y,10);
% Fit AR(10) model
stem(reflect_coeffs); axis([-0.05 10.5 -1 1]);
title('Reflection Coefficients by Lag'); xlabel('Lag');
ylabel('Reflection Coefficent');

The reflection coefficients decay to zero after lag 2, which indicates that an AR(10) model significantly overestimates the time dependence in the data.
aryule uses the Levinson-Durbin recursions on the biased estimate of the sample autocorrelation sequence to compute the coefficients.
Monson,H. Statistical Digital Signal Processing and Modeling, John Wiley & Sons, 1996.
arburg | arcov | armcov | levinson | lpc
![]() | armcov | barthannwin | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |