On 08/05/12 09:39, James Steward wrote: > Hi, > > Regarding the fir1 function and the "blackmanharris" window; > > If I specify an even number of coefficients (n) it produces a symmetric > filter with an odd number of coefficients (n+1). > > If I specify an odd number of coefficients it produces a non symmetric > filter with an even number of coefficients. > > octave:39> version > ans = 3.0.5 > octave:40> b=fir1(8, 0.5, "blackmanharris") > b = > > Columns 1 through 8: > > -7.1851e-08 -2.8280e-03 2.6042e-04 2.7158e-01 6.1193e-01 > 2.7158e-01 2.6042e-04 -2.8280e-03 > > Column 9: > > -7.1851e-08 > > octave:41> b=fir1(7, 0.5, "blackmanharris") > b = > > -3.8206e-04 -5.2516e-04 2.6785e-02 3.8140e-01 6.1393e-01 > 1.2791e-01 -1.5875e-02 -3.8206e-04 > > octave:42> > > Is there some trick to producing a symmetric "blackmanharris" windowed > filter with an even number of coefficients? >
In reply to myself, I looked at the wikipedia page [1] that describes the Blackman-Harris filter, and wrote my own blackmanharris.m function from that. It seems to work just fine, though with no parameter sensibility checking. Then out of curiosity I checked my installed signal library function [2] and found that it is certainly different. [1] http://en.wikipedia.org/wiki/Window_function#Blackman.E2.80.93Harris_window [2] /usr/share/octave/packages/signal-1.0.10/blackmanharris.m Regards, James. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev