|
From: | Paul Kienzle |
Subject: | Re: How to use fir1 with 'scale' |
Date: | Wed, 21 Jul 2004 15:32:17 -0400 |
On Jul 21, 2004, at 6:59 AM, Per Persson wrote:
On Jul 21, 2004, at 05:34, Joe Koski wrote:When I try b = fir1(nfilt,0.01,'low','hamming','scale'); I get an fir2 error "window must be of length n+1" Anybody got an idea? Thanks.Try: b = fir1(nfilt,0.01,'low', hamming(nfilt+1),'scale') instead. (nfilt is the number of delays, not coeffs) Don't know why passing just the window name doesn't work.
Because the author didn't think to implement it? He will accept patches though 8-) If you are going to attempt this, you should check not only for strings, but also for typeinfo(window)=="function handle" (there is no 'isfunction' call, and 'exist' only accepts strings). While you are at it, you should accept the arguments scale | noscale low | high | pass | stop | dc-0|dc-1 hamming | hanning | gausswin | triang | boxcar | ... in any order. Paul Kienzle address@hidden ------------------------------------------------------------- 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 -------------------------------------------------------------
[Prev in Thread] | Current Thread | [Next in Thread] |