Yule-Walker equations (Levinson's algorithm)
[ar, sigma2, rc]=lev(r)
correlation coefficients
auto-Regressive model parameters
scale constant
reflection coefficients
This function resolves the Yule-Walker equations using Levinson's algorithm. Generally, it is used to estimate the coefficients of an autoregressive process.
b=1; //numerator a=[1 -0.7 0.8]; //denominator x=[1 zeros(1,99)]; //input=impulse data=filter(b,a,x); //real data a2=lev(data); //modelized data a2=a2/a2(1); //normalization m_data=filter(1,a2,x); // Compare real data and modelized data plot(data,"color","blue","lineStyle","none","marker","d"); plot(m_data,"color","red","lineStyle","none","marker","d"); | ![]() | ![]() |