[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
using conv vs. filter
From: |
E. Joshua Rigler |
Subject: |
using conv vs. filter |
Date: |
05 Dec 2001 13:29:09 -0700 |
I'm looking at the code for conv.m in the octave libraries. It does
some sort of zero-padding, then calls the "filter" function. The output
is a vector that is length(a)+lenght)b)+1.
Now, I am trying to convolve an filter with both negative, zero, and
positively lagged coefficients with an input time series. In order for
my time-steps to be synchronized between the input time series, and the
output from conv.m, how would I index the output? I guess I just don't
really understand how the conv.m function works in octave.
At the moment, I use a filter that has an equal number of positive and
negatively lagged coefficients, and the output seems reasonable when I
do something like:
output = conv (filter, input);
output = output (length(filter)/2 : length(output)- \
length(filter)/2);
1) Does what I have seem right?
2) What do I do if my filter has fewer/more negatively lagged
coefficients than positively lagged coefficients?
Thanks,
-EJR
-------------------------------------------------------------
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
-------------------------------------------------------------
- using conv vs. filter,
E. Joshua Rigler <=