Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to use firpmord for bandpass filter design

702 views
Skip to first unread message

skyworld

unread,
Sep 14, 2007, 1:32:46 AM9/14/07
to
Hi,

I am learning FIR design with Matlab. Now I'm confused by function
"firpmord". I checked help file, but I don't understand "The length of
f is two less than twice the length of a" in its explanation in
matlab. Also I don't know how to build up "a" for bandpass filter,
though there are examples for lowpass filters. Can anybody help me?
thanks very much.


regards

skyworld

Trebla

unread,
Dec 8, 2011, 12:19:08 AM12/8/11
to
The best thing to do when the documentation is lacking is to read the comments in the function's code. They usually contain more details.

In this case, the comments mention that F's start and end are predetermined and not added by the user. I've included a portion below.

The resulting filter will approximately meet the specifications given
% by the input parameters F, A, and DEV. F is a vector of cutoff
% frequencies in Hz, in ascending order between 0 and half the sampling
% frequency Fs. If you do not specify Fs, it defaults to 2. A is a
% vector specifying the desired function's amplitude on the bands defined
% by F. The length of F is twice the length of A, minus 2 (it must
% therefore be even). The first frequency band always starts at zero,
% and the last always ends at Fs/2. It is not necessary to add these
% elements to the F vector.
0 new messages