Function to find ar coefficients using Least squres
3 次查看(过去 30 天)
显示 更早的评论
Hi,
Can someone help me write a FUNCTION to estimate AR(p) coefficients using LEAST SQUARES?
Thanks
采纳的回答
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 中查找有关 Online Estimation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!