How can I generate an AR(1) process with function filter.m?

I tried with this code, but I'm not sure about the result...
e=randn(500,1) b=[1 phi]; y=filter(b,1,e);
Note: phi is the coefficient of the lagged variable.

답변 (1개)

Roger Wohlwend
Roger Wohlwend 2014년 9월 24일

1 개 추천

You did not implement an AR(1) but an MA(1) process. It is not possible to generate an AR(1) process with the function filter. You have to do it with a for-loop - or use certain functions of the Econometrics toolbox.

카테고리

도움말 센터File Exchange에서 Filter Banks에 대해 자세히 알아보기

태그

질문:

2014년 9월 23일

답변:

2014년 9월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by