filtRespBut

版本 1.0.0 (2.8 KB) 作者: Witold Waldman
Frequency response (transfer function) of an nth-order Butterworth filter
5.0 次下载
更新时间 2022/7/3

查看许可证

Computes the complex frequency response function (transfer function) of an nth-order low-pass, high-pass or all-pass Butterworth filter.
Syntax
h = filtRespBut(f,n,fc,filtType)
h = filtRespBut(f,n,fc)
filtRespBut(__)
filtRespBut()
Description
h = filtRespBut(f,n,fc,filtType) returns the frequency response column vector computed at the frequencies supplied in f (in Hz). Here n is the order of the Butterworth filter, fc is the –3.01 dB cutoff frequency, and filtType is used to specify if the filter is a low-pass filter or a high-pass filter.
Note that the values of n and/or fc can be specified as scalars or as vectors. If only one of the two is a vector, a matrix of column vectors is returned. If both nand and fc are vectors, e.g., n = [2, 3] and fc = [500, 1000, 1500], then a three-dimensional array of column vectors is returned. In this case, the second dimension corresponds to each n(j), j=1:numel(n), while the third dimension corresponds to each fc(k), k=1:numel(fc).
A high-pass filter is specified by setting filtType to be one of the following: 'H', 'HP', 'HIGHPASS', 'HIGH-PASS'.
A low-pass filter is specified by setting filtType to be one of the following: 'L', 'LP', 'LOWPASS', 'LOW-PASS'.
An odd-order all-pass filter is specified by setting filtType to be one of the following: 'A', 'AP', 'ALLPASS', 'ALL-PASS'. These are "recombining to all-pass" odd-order Butterworth filters, so n must be an odd number.
If filtType is omitted or is empty ([]), then a high-pass filter is the default choice.
filtRespBut(__) with no output arguments plots the magnitude and phase response of the Butterworth filter (its frequency response or transfer function).
filtRespBut() with no input arguments plots the magnitude and phase response of an example Butterworth filter.

引用格式

Witold Waldman (2024). filtRespBut (https://www.mathworks.com/matlabcentral/fileexchange/114515-filtrespbut), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2022a
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0