sscalm1d(3F)

sscalm1d, dscalm1d - scales Multiple 1D real sequences.

As shipped in IRIX 6.5.30. Unchanged since IRIX 6.5.

NAME
     sscalm1d, dscalm1d - scales Multiple 1D real sequences.

SYNOPSYS
     Fortran :
     subroutine sscalm1d( n, p, alpha, array, inc, lda)
          integer            n, p, inc, lda
          real               alpha, array(lda,p)
     subroutine dscalm1d( n, p, alpha, array, inc, lda)
          integer            n, p, inc, lda
          real*8             alpha, array(lda,p)

     C :
     #include <fft.h>
     int sscalm1d ( int n, int p, float alpha, float *array,
               int inc, int lda);
     int dscalm1d ( int n, int p, double alpha, double *array,
               int inc, int lda);


DESCRIPTION
     sscalm1d and dscalm1d scale the P real 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.  Often sscalm1d or dscalm1d 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.

     ARRAY Array containing the samples of the sequence to be scaled (in
     place0.

     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 real 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 1026 (1026 >= 1024+2).
     Fortran
          real array(0:1026-1,0:64-1), coeff(1024+15)
          call scfftm1dui( 1024, coeff)
          call scfftm1du( -1, 1024, 64, array, 1, 1026, coeff)
          call csfftm1du(  1, 1024, 64, array, 1, 1026, coeff)
          call sscalm1d(1024,64,(1./real(1024)),array,1,1026)

     C
          #include <fft.h>
          float array[64*1026], *coeff;
          coeff = scfftm1dui( 1024, NULL);
          scfftm1du( -1, 1024, 64, array, 1, 1026, coeff);
          csfftm1du(  1, 1024, 64, array, 1, 1026, coeff);
          sscalm1d( 1024, 64, 1./(float)1024, array, 1, 1026);

     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, scfftm1dui, dzfftm1dui, scfftm1du, dzfftm1du, csfftm1du, zdfftm1du,
     sprodm1du, dprodm1du