from
Audio Filter GUI DEMO
by Theodoros Giannakopoulos
This demo provides a simple GUI for basic filtering of audio data.
|
| untitled |
function Hd = untitled
%UNTITLED Returns a discrete-time filter object
%
% M-File generated by MATLAB(R) 7.0 and the Signal Processing Toolbox 6.2.
%
% Generated on: 26-Mar-2008 21:23:07
%
% Equiripple Bandstop filter designed using the FIRPM function.
% All frequency values are in Hz.
Fs = 48000; % Sampling Frequency
Fpass1 = 7200; % First Passband Frequency
Fstop1 = 9600; % First Stopband Frequency
Fstop2 = 12000; % Second Stopband Frequency
Fpass2 = 14400; % Second Passband Frequency
Dpass1 = 0.028774368332; % First Passband Ripple
Dstop = 0.001; % Stopband Attenuation
Dpass2 = 0.057501127785; % Second Passband Ripple
dens = 20; % Density Factor
% Calculate the order from the parameters using FIRPMORD.
[N, Fo, Ao, W] = firpmord([Fpass1 Fstop1 Fstop2 Fpass2]/(Fs/2), [1 0 ...
1], [Dpass1 Dstop Dpass2]);
% Calculate the coefficients using the FIRPM function.
b = firpm(N, Fo, Ao, W, {dens});
Hd = dfilt.dffir(b);
% [EOF]
|
|
Contact us at files@mathworks.com