Mercurial > octave
comparison scripts/signal/fftconv.m @ 3426:f8dde1807dee
[project @ 2000-01-13 08:40:00 by jwe]
author | jwe |
---|---|
date | Thu, 13 Jan 2000 08:40:53 +0000 |
parents | 0748b03c3510 |
children | 858695b3ed62 |
comparison
equal
deleted
inserted
replaced
3425:8625164a0a39 | 3426:f8dde1807dee |
---|---|
21 ## @deftypefn {Function File} {} fftconv (@var{a}, @var{b}, @var{n}) | 21 ## @deftypefn {Function File} {} fftconv (@var{a}, @var{b}, @var{n}) |
22 ## Return the convolution of the vectors @var{a} and @var{b}, as a vector | 22 ## Return the convolution of the vectors @var{a} and @var{b}, as a vector |
23 ## with length equal to the @code{length (a) + length (b) - 1}. If @var{a} | 23 ## with length equal to the @code{length (a) + length (b) - 1}. If @var{a} |
24 ## and @var{b} are the coefficient vectors of two polynomials, the returned | 24 ## and @var{b} are the coefficient vectors of two polynomials, the returned |
25 ## value is the coefficient vector of the product polynomial. | 25 ## value is the coefficient vector of the product polynomial. |
26 ## | 26 ## |
27 ## The computation uses the FFT by calling the function @code{fftfilt}. If | 27 ## The computation uses the FFT by calling the function @code{fftfilt}. If |
28 ## the optional argument @var{n} is specified, an N-point FFT is used. | 28 ## the optional argument @var{n} is specified, an N-point FFT is used. |
29 ## @end deftypefn | 29 ## @end deftypefn |
30 | 30 |
31 ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> | 31 ## Author: KH <Kurt.Hornik@ci.tuwien.ac.at> |
51 b(lc) = 0; | 51 b(lc) = 0; |
52 if (nargin == 2) | 52 if (nargin == 2) |
53 c = fftfilt (a, b); | 53 c = fftfilt (a, b); |
54 else | 54 else |
55 if !(is_scalar (N)) | 55 if !(is_scalar (N)) |
56 error ("fftconv: N has to be a scalar"); | 56 error ("fftconv: N has to be a scalar"); |
57 endif | 57 endif |
58 c = fftfilt (a, b, N); | 58 c = fftfilt (a, b, N); |
59 endif | 59 endif |
60 endif | 60 endif |
61 | 61 |