help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Frequencies in fir1, etc.


From: Quentin Spencer
Subject: Re: Frequencies in fir1, etc.
Date: Fri, 09 Jan 2004 16:15:12 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4

Joe Koski wrote:

For those of us who took our digital signal processing class 20+ years ago,
is there a simple way to relate w in the call b = fir1(n,w) to an actual
cutoff frequency (omega sub c or f sub c) based on parameters like point
spacing (T), n, pi, etc.? Apparently w is between 0 and 1 (at least for a
low or high pass filter). The conversion must be so trivial that it isn't
needed, but for me, at least, this conversion would be a useful addition to
the help files. My 1975 edition of Oppenheim and Schafer isn't too clear on
this conversion either. Thanks.

Joe Koski
The numbers are in the range [0,1], where 1 represents the Nyquist frequency, or half the sample rate. In my code, I usually do something like this:
f_samp = ( put your sample rate here);
f_nyquist = f_samp/2;
b = fir1(N,[freq_1, freq_2]/f_nyquist);

-Quentin




-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]