Function to find ar coefficients using Least squres
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
Can someone help me write a FUNCTION to estimate AR(p) coefficients using LEAST SQUARES?
Thanks
댓글 수: 4
채택된 답변
Azzi Abdelmalek
2013년 2월 24일
편집: Azzi Abdelmalek
2013년 2월 24일
Construct your measure matrix Fi,
yourcoeff=FI\y
Example
% y(n)=a1 y(n-1)+a2 y(n-2)+ a3 y(n-3) your system
% if y=[1 2 3 4 5 6 7 8 9 10]
y= [4;5;6;7] % Using 4 samples
FI=[3 2 1 % measure matrix
4 3 2
5 4 3
6 5 4]
% coeff=[a1;a2;a3] coefficients to find
coeff=FI\y
댓글 수: 3
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!