📄 spike.m
字号:
function [h,err] = spike(g,n0,n)%SPIKE Finds the FIR least squares inverse of g(n)%----%USAGE: [h,err] = spike(g,n0,n) %% g : the filter that is to be inverted% n0 : the delay used in the minimization of% e(n)=g(n)*g(n) - delta(n-n0)% n : order (number of coefficients) in h% h : the FIR least squares inverse of g% err : squared error in the approximation%%---------------------------------------------------------------% copyright 1996, by M.H. Hayes. For use with the book % "Statistical Digital Signal Processing and Modeling"% (John Wiley & Sons, 1996).%---------------------------------------------------------------g = g(:);m = length(g);if m+n-1<=n0, error('Delay too large'), endG = convm(g,n);d = zeros(m+n-1,1);d(n0+1) = 1;h = G\d;err = 1 - G(n0+1,:)*h;end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -