Code covered by the BSD License  

Highlights from
Data Analysis with MATLAB Products - August 2006 Webinar Files

image thumbnail

Data Analysis with MATLAB Products - August 2006 Webinar Files

by

 

14 Aug 2006 (Updated )

Files used in the August 10, 2006 Webinar of same title

myLPFilter
function Hd = myLPFilter
%MYLPFILTER Returns a discrete-time filter object.

%
% M-File generated by MATLAB(R) 7.2 and the Signal Processing Toolbox 6.5.
%
% Generated on: 10-Aug-2006 14:15:39
%

% Equiripple Lowpass filter designed using the FIRPM function.

% All frequency values are in Hz.
Fs = 500;  % Sampling Frequency

Fpass = 10;              % Passband Frequency
Fstop = 12;              % Stopband Frequency
Dpass = 0.057501127785;  % Passband Ripple
Dstop = 0.0001;          % Stopband Attenuation
dens  = 20;              % Density Factor

% Calculate the order from the parameters using FIRPMORD.
[N, Fo, Ao, W] = firpmord([Fpass, Fstop]/(Fs/2), [1 0], [Dpass, Dstop]);

% Calculate the coefficients using the FIRPM function.
b  = firpm(N, Fo, Ao, W, {dens});
Hd = dfilt.dffir(b);


% [EOF]

Contact us