cscalm1d(3F)

cscalm1d, zscalm1d - scales Multiple 1D complex sequences.

As shipped in IRIX 6.5. First release of IRIX 6.5.

NAME
     cscalm1d, zscalm1d - scales Multiple 1D complex sequences.

SYNOPSYS
     Fortran :
     subroutine cscalm1d( n, p, alpha, array, inc, lda)
          integer            n, p, inc, lda
          real               alpha
          complex            array(lda,p)
     subroutine zscalm1d( sign, n, p, array, inc, lda)
          integer            n, p, inc, lda
          real*8             alpha
          double complex     array(lda,p)

     C :
     #include <fft.h>
     int cscalm1d ( int n, int p, float alpha, complex *array,
               int inc, int lda);
     int zscalm1d ( int n, int p, double alpha, zomplex *array,
               int inc, int lda);


DESCRIPTION
     cscalm1d and zscalm1d scale the P complex sequences of N samples each.
     The Fourier Transforms are not normalized so the succession Direct-
     Inverse transform scales the input data by a factor equal to the size of
     the transform.  cscalm1d or zscalm1d are used to scale back the result.

PARAMETERS
     N - Integer, the number of samples in each sequence.
     Unchanged on exit.

     P - Integer, the number of sequences.  Unchanged on exit.

     Alpha - scaling floating point value.  Unchanged on exit.

     ARRAY - Array containing the samples of the sequence to be scaled (in
     place).

     INC - Integer, increment between two consecutive elements of a sequence.
     Unchanged on exit.

     LDA - Integer, leading dimension: increment between the first samples of
     two consecutive sequences.  Unchanged on exit.


Example of Calling Sequence
     Working on 64 sequences of 1024 complex values each.  We successively
     apply a Direct Fourier Transform, an Inverse Fourier Trasnform and
     finally scale back the result by a factor 1/N (1/1024.)-
     This sequence DirectFFT-InverseFFT-Scaling is equivalent to the identity
     operator and the final sequence should be equal (with round-off
     precision) to the initial sequence.
     Elements of each sequence are stored with increment (stride) 1, and the
     offset between the first element of two succesive sequence (leading
     dimension) is 2049.
     Fortran :
          complex array(0:2049-1,0:64-1), coeff(1024+15)
          call cfftm1di( 1024, coeff)
          call cfftm1d( -1, 1024, 64, array, 1, 2049, coeff)
          call cfftm1d(  1, 1024, 64, array, 1, 2049, coeff)
          call cscalm1d(1024,64,(1./real(1024)),array,1,2049)

     C :
          #include <fft.h>
          complex array[64*2049], *coeff;
          coeff = cfftm1di( 1024, NULL);
          cfftm1d( -1, 1024, 64, array, 1, 2049, coeff);
          cfftm1d(  1, 1024, 64, array, 1, 2049, coeff);
          cscalm1d( 1024, 64, 1./(float)1024, array, 1, 2049);

     NOTE_1 : The Direct and Inverse transforms should use opposite signs -
     Which one is used (+1 or -1) for Direct transform is just a matter of
     convention-

     NOTE_2 : The Fourier Transforms are not normalized so the succession
     Direct-Inverse transform scales the input data by a factor equal to the
     size of the transform.

SEE ALSO
     fft, cfftm1di, zfftm1di, cfftm1d, zfftm1d, cprodm1d, zprodm1d