⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 minphase.m

📁 《数字信号处理:基于计算机的方法(第三版)》资源下载第三部分。 著者: (美)米特拉著 作译者: 孙洪等译 ISBN号: 7-121-02652-X 出版日期: 2006-06 出版
💻 M
字号:
function [y,ssp,iter] = minphase(g);
% Extracts the minimum phase factor y from a linear-phase filter.
% Input: g = [g(0) g(1) . . . g(N)] (row vector) where
% the g vector is the right-half of a linear-phase FIR filter.
% Assumption: Unit-circle zeros of g are of even multiplicity.
% Copyright (c) January 2002 by H.J. Orchard and A.N. Willson, Jr.
% Initialize y (poly. with all zeros at z = 0)
y = [1 zeros(1,length(g)-1)];
ssp = realmax;% A large number (for previous norm)
ss = ssp/2;   % Smaller large no. (for current norm)
iter = 0; e = 0;  % Initialize iter. counter & correction vector
while ( ss < ssp)
    y = y + e'; ssp = ss;% Update y and move old norm(e) value
    iter = iter + 1; % Increment the iteration count
    AR = toeplitz([y(1),zeros(1, length(h)-1)], y);
    M = toeplitz([y(length(g)),zeros(1,length(g)-1)],fliplr(y))
    AL = fliplr(M);
    A = AL + AR;% Create the A matrix
    b = g' - AL*y'; % and the b vector
    e = A\b;% Solve Ae = b for the correction vector e
    ss = norm(e);   % Get norm to see if it is still decreasing
end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -