?? 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 + -