fir1d(3F)
SFIR1D, DFIR1D, CFIR1D, ZFIR1D - 1D Convolution in the time domain.
Showing IRIX 6.5.30 (default release). Unchanged since IRIX 6.5.
NAME SFIR1D, DFIR1D, CFIR1D, ZFIR1D - 1D Convolution in the time domain. FORTRAN SPECIFICATION subroutine SFIR1D( in_put, incinp, i0_inp, n_inp, firfil, incfir, i0_fir, n_fir, output, incout, i0_out, n_out, alpha, beta ) integer incinp, i0_inp, n_inp, incfir, i0_fir, n_fir incout, i0_out, n_out real in_put(*), firfil(*), output(*), alpha, beta subroutine DFIR1D( in_put, incinp, i0_inp, n_inp, firfil, incfir, i0_fir, n_fir, output, incout, i0_out, n_out, alpha, beta ) integer incinp, i0_inp, n_inp, incfir, i0_fir, n_fir incout, i0_out, n_out double precision in_put(*), firfil(*), output(*), alpha, beta subroutine CFIR1D( in_put, incinp, i0_inp, n_inp, firfil, incfir, i0_fir, n_fir, output, incout, i0_out, n_out, alpha, beta ) integer incinp, i0_inp, n_inp, incfir, i0_fir, n_fir incout, i0_out, n_out complex in_put(*), firfil(*), output(*), alpha, beta subroutine ZFIR1D( in_put, incinp, i0_inp, n_inp, firfil, incfir, i0_fir, n_fir, output, incout, i0_out, n_out, alpha, beta ) integer incinp, i0_inp, n_inp, incfir, i0_fir, n_fir incout, i0_out, n_out double complex in_put(*), firfil(*), output(*), alpha, beta C SPECIFICATION #include <conv.h> void sfir1d( float *f, int incf, int if0, int nf, float *g, int incg, int ig0, int ng, float *h, int inch, int ih0, int nh, float alpha, float beta) void dfir1d( double *f, int incf, int if0, int nf, double *g, int incg, int ig0, int ng, double *h, int inch, int ih0, int nh, double alpha, double beta) void cfir1d( complex *f, int incf, int if0, int nf, complex *g, int incg, int ig0, int ng, complex *h, int inch, int ih0, int nh, complex *alpha, complex *beta) void zfir1d( zomplex *f, int incf, int if0, int nf, zomplex *g, int incg, int ig0, int ng, zomplex *h, int inch, int ih0, int nh, zomplex *alpha, zomplex *beta) DESCRIPTION SFIR1D and DFIR1D compute a 1D convolution in the time domain : O(j) = Sum[ I(i) * F(j-i) ] USAGE These modules compute the result of the convolution in the "output" range padding with zeroes when needed. In theory, an input sequence of "n_inp" samples starting at time "i0_inp", filtered by a sequence of "n_fir" samples starting at time "i0_fir", will result in a new signal of (n_inp + n_fir - 1) non zero samples starting at time (i0_inp + i0_fir). We just compute here the values that fall in that range and zero the rest. This may be interesting, for example when filtering a sequence of N samples, with a symmetric filter of 2m+1 samples. If one wants only to compute the central N resulting samples, the following call can be used: call _fir1d( f, 0, 1, N, g, -m, 1, 2*m+1, h, 0, 1, N) PARAMETERS in_put Pointer to FIRST sample of sequence "in_put" incinp Increment between two successive values of "in_put" i0_inp Index of the first element of "in_put" n_inp Number of samples of "in_put" firfil Pointer to FIRST sample of sequence "firfil" incfir Increment between two successive values of "firfil" i0_fir Index of the first element of "firfil" i0_fir Number of samples of "firfil" output Pointer to FIRST sample of sequence "output" incout Increment between two successive values of "output" i0_out Index of the first element of "output" n_out Number of samples of "output" alpha Scaling factor for the convolution beta Scaling factor for the Output on Entry IMPORTANT NOTE: The array pointers must all point to the first element of the array "i0_inp", "i0_fir" and "i0_out". If "in_put" for example is defined as dimension in_put(-25:45) Then "dfir1d" must be called with the following parameters call dfir1d( in_put(-25),1,-25,45, ... ) AUTHORS Jean-Pierre Panziera, 1/12/93.