*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> complib/sscal1d (3)              
Title
Content
Arch
Section
 

Contents


sscal1d,dscal1d(3F)					   sscal1d,dscal1d(3F)


NAME    [Toc]    [Back]

     sscal1d, dscal1d -	scales a 1D real sequence.

SYNOPSYS    [Toc]    [Back]

     Fortran :
     subroutine	sscal1d( n, alpha, array, inc)
	  integer	     n,	inc
	  real		     alpha, array(0:(n-1)*inc)
     subroutine	dscal1d( sign, n, p, array, inc, lda)
	  integer	     n,	inc
	  real*8	     alpha, array(0:(n-1)*inc)

     C :
     #include <fft.h>
     int sscal1d ( int n, float	alpha, float *array, int inc);
     int dscal1d ( int n, double alpha,	double *array, int inc);

DESCRIPTION    [Toc]    [Back]

     sscal1d and dscal1d scale a 1D real sequence of N samples.
     The Fourier Transforms are	not normalized so the succession DirectInverse
 transform scales the input	data by	a factor equal to the size of
     the transform.  sscal1d or	dscal1d	may be used to scale back the result.

PARAMETERS    [Toc]    [Back]

     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
     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
     Given a 1024 real values sequence.	 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.
     Fortran
	  real array(0:1024-1),	coeff(1024+15)



									Page 1






sscal1d,dscal1d(3F)					   sscal1d,dscal1d(3F)



	 call scfft1dui( 1024, coeff)
	  call scfft1du( -1, 1024, array, 1, coeff)
	  call scfft1du(  1, 1024, array, 1, coeff)
	  call sscal1d(	1024, (1./real(1024)), array,1)

     C
	  #include <fft.h>
	  float	array[1024], *coeff;
	  coeff	= scfft1dui( 1024, NULL);
	  scfft1du( -1,	1024, array, 1,	coeff);
	  csfft1du(  1,	1024, array, 1,	coeff);
	  sscal1d( 1024, 1./(float)1024, array,	1);

     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    [Toc]    [Back]

      
      
     fft, scfft1dui, dzfft1dui,	scfft1du, dzfft1du, csfft1du, zdfft1du,
     sprod1du, dprod1du


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
sscal2d IRIX scales 2D real sequence.
sscal3d IRIX scales 3D real sequence.
cscal3d IRIX scales a 3D complex sequence.
cscal2d IRIX scales a 2D complex sequence.
sscalm1d IRIX scales Multiple 1D real sequences.
dlar2v IRIX sequence of 2-by-2 real symmetric matrices, defined by the elements of the vectors x, y and z
slar2v IRIX sequence of 2-by-2 real symmetric matrices, defined by the elements of the vectors x, y and z
sdfft3du IRIX 3D Real to Complex Fast Fourier Transform. FORTRAN SPECIFICATION subroutine DFFT3DU( job, n1, n2, n3, sequence
sdfft1du IRIX 1D Real to Complex Fast Fourier Transform. FORTRAN SPECIFICATION subroutine DFFT1DU( job, n, sequence, inc, wo
sdfft2du IRIX 2D Real to Complex Fast Fourier Transform. FORTRAN SPECIFICATION subroutine DFFT2DU( job, n1, n2, sequence, ld
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service