I am using built-in function * lpc* to return the coefficients of a forward linear predictor by minimizing the predictor error; for example:
x = [1,2,4,8]
[a, e] = lpc(x,1)
a = 1.000000 -0.4941176
e = 16.0617
I thought it should have output `a=1.00, -2`, because I was using a 1-order linear predictor, it was easy to estimate that x(t) = 2*x(t-1).
Something might be wrong because of my superficial understanding. Then I read the `lpc.m` source code, and its comment says:
So, a(2) should be -2;
Then I went on reading lpc help document and its example codes, such as:
noise = randn(50000,1);
x = filter(1,[1 1/2 1/3 1/4],noise);
x = x(45904:50000);
a = lpc(x,3)
it printed the result of a with [1.000000000000000 0.488260222978665 0.337341624006294 0.255574741469446] it was exactly equal to the coefficients in filter function.
However, I read the source code of filter.m, it was using another AR model:
but lpc's output result agreed with filter's, how could that happen?
Is there something wrong with me or built-in functions? You known, I need your help. Thanks a lot.