rtoa.m
来自「solution for the Statistical modelling f」· M 代码 · 共 69 行
M
69 行
function [a,epsilon]=rtoa(r)%RTOA Levinson-Durbin recursion.%----%USAGE: [a,epsilon]=rtoa(r)%% Solves the Toeplitz normal equations% R a = epsilon [1 0 ... 0]'% where R=toeplitz(r) is a Toeplitz matrix that contains% the autocorrelation sequence r(k). The ouputs are the% coefficients of the all-pole model a(k) and the constant% epsilon.%% see also ATOG, ATOR, GTOA, GTOR, RTOG%%---------------------------------------------------------------% copyright 1996, by M.H. Hayes. For use with the book % "Statistical Digital Signal Processing and Modeling"% (John Wiley & Sons, 1996).%---------------------------------------------------------------r=r(:);p=length(r)-1;a=1;epsilon=r(1);for j=2:p+1; gamma=-r(2:j)'*flipud(a)/epsilon; a=[a;0] + gamma*[0;conj(flipud(a))]; epsilon=epsilon*(1 - abs(gamma)^2); end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?