filtRespBut
Version 1.0.0 (2,82 KB) von
Witold Waldman
Frequency response (transfer function) of an nth-order Butterworth filter
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.
Zitieren als
Witold Waldman (2024). filtRespBut (https://www.mathworks.com/matlabcentral/fileexchange/114515-filtrespbut), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Erstellt mit
R2022a
Kompatibel mit allen Versionen
Plattform-Kompatibilität
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
Version | Veröffentlicht | Versionshinweise | |
---|---|---|---|
1.0.0 |