home *** CD-ROM | disk | FTP | other *** search
- subroutine ornl_dcor1d( f,incf,if0, nf,
- $ g,incg,ig0, ng,
- $ h,inch,ih0, nh)
- double precision f(1), g(1), h(1)
- integer incf, if0, nf, incg, ig0, ng, inch, ih0, nh
- c-----------------------------------------------------------------------------
- c
- c dcor1d performs a 1D correlation in the time domain :
- c h(j) = Sum[ f(i) * g(i-j) ]
- c
- c-----------------------------------------------------------------------------
- c
- c PARAMETERS:
- c
- c f: Vector containing sequence "f"
- c incf: Increment between two successive values of "f"
- c if0: Starting time of Sequence
- c nf: Number of elements of sequence
- c
- c g: Vector containing sequence "g"
- c incg: Increment between two successive values of "g"
- c ig0: Starting time of Sequence
- c ng: Number of elements of sequence
- c
- c h: Vector containing sequence "h"
- c inch: Increment between two successive values of "h"
- c ih0: Starting time of Sequence
- c nh: Number of elements of sequence
- c
- c-----------------------------------------------------------------------------
- c
- c PLEASE NOTE:
- c 1- Please note that the array pointers must all point to the first
- c element of the array "nf1", "ng1" and "nh1".
- c If "f" for example is defined as
- c dimension f(-25:45)
- c Then "dcor1d" must be called with the following parameters
- c call dcor1d( f(-25),1,-25,45, ... )
- c
- c 2- Please also note, that due to DEFINITION of the correlation operation,
- c it cannot be done in place ... unless "ig0+ng-1" (the time of the last
- c sample of "g") is <= 0 ... a circumstance which is mostly unlikely.
- c-----------------------------------------------------------------------------
- c
- c This Fortran Subroutine written by
- c Jean-Pierre Panziera
- c Silicon Graphics Inc
- c September 20, 1991
- c
- c-----------------------------------------------------------------------------
- double precision one, zero
- parameter( one = 1., zero = 0.)
- c-----------------------------------------------------------------------------
- c
- c Call dfir1d with the Swapped sequence "g" ...
- c
- c-----------------------------------------------------------------------------
- call ornl_dfir1d( f,incf,if0,nf,
- $ g(1+(ng-1)*incg),-incg,-(ig0+ng-1),ng,
- $ h,inch,ih0,nh,
- $ one, zero)
- return
- end
-