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

📄 first_order_hp.m

📁 声音过滤器工具大集合.
💻 M
字号:
function [b, a] = first_order_HP(fc, fs)
%FIRST_ORDER_HP - First-Order IIR Butterworth High-Pass Filter Design Routine
%
%     usage:  [b, a] = first_order_HP(fc, fs)
%     
%           b = Two column vector, numerator coefficients
%           a = Two column vector, denominator coefficients
%          fc = Scalar, cutoff frequency (in Hz)
%          fs = Scalar, sampling frequency (in Hz)

%  NOTICE: MATLAB's filter.m function implements the standard 
%          difference equation with subtracting the weighted
%          previous output:
%
%          a(1)*y(n) = b(1)*x(n) + b(2)*x(n-1) 
%                                - a(2)*y(n-1) 
%
%          Therefore this routine negates the calculated a(2)
%          coefficient in order to accomodate this. However, if 
%          the difference equation of your implementation adds
%          the weighted previous output rather than subtracting it 
%          then you should either modify the following code (i.e. 
%          remove the negation) or use conv_coeff.m function to 
%          obtain the original coefficients.

%   References:
%      [1]  John Lane, Jayant Datta, Brent Karley, Jay Norwood, "DSP Filters", 
%           PROMPT Publications(an imprint of Sams Technical Publishing), 
%           Indianapolis, IN, 2001, page 54.
%           Book's website: www.dspaudiocookbook.com

%  Copyright (c) 2005 Bo餫

⌨️ 快捷键说明

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