Mercurial > hg > octave-nkf
comparison scripts/signal/fftconv.m @ 904:3470f1e25a79
[project @ 1994-11-09 21:22:15 by jwe]
author | jwe |
---|---|
date | Wed, 09 Nov 1994 21:22:15 +0000 |
parents | c5d35bb139b6 |
children | 9fc405c8c06c |
comparison
equal
deleted
inserted
replaced
903:b3692d63cca3 | 904:3470f1e25a79 |
---|---|
1 function c = fftconv (a, b, N) | 1 function c = fftconv (a, b, N) |
2 | 2 |
3 # usage: fftconv (a, b [, N]) | 3 # usage: fftconv (a, b [, N]) |
4 # | 4 # |
5 # c = fftconv (a, b) returns the convolution of the vectors a and b, | 5 # c = fftconv (a, b) returns the convolution of the vectors a and b, |
6 # a vector with length equal to length (a) + length (b) - 1. | 6 # a vector with length equal to length (a) + length (b) - 1. |
7 # If a and b are the coefficient vectors of two polynomials, c is | 7 # If a and b are the coefficient vectors of two polynomials, c is |
8 # the coefficient vector of the product polynomial. | 8 # the coefficient vector of the product polynomial. |
9 # | 9 # |
10 # The computation uses the FFT by calling fftfilt. If the optional | 10 # The computation uses the FFT by calling fftfilt. If the optional |
11 # argument N is specified, an N-point FFT is used. | 11 # argument N is specified, an N-point FFT is used. |
12 | 12 |
13 # Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Sep 3, 1994 | 13 # Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Sep 3, 1994 |
14 # Copyright Dept of Statistics and Probability Theory TU Wien | 14 # Copyright Dept of Statistics and Probability Theory TU Wien |
15 | 15 |
16 if (nargin < 2 || nargin > 3) | 16 if (nargin < 2 || nargin > 3) |
17 error ("usage: fftconv (b, x [, N])"); | 17 usage (" fftconv (b, x [, N])"); |
18 endif | 18 endif |
19 | 19 |
20 if (is_matrix (a) || is_matrix (b)) | 20 if (is_matrix (a) || is_matrix (b)) |
21 error ("fftconv: both a and b should be vectors"); | 21 error ("fftconv: both a and b should be vectors"); |
22 endif | 22 endif |