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

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

Contents


cscal1d,zscal1d(3F)					   cscal1d,zscal1d(3F)


NAME    [Toc]    [Back]

     cscal1d, zscal1d -	scales a 1D real sequence.

SYNOPSYS    [Toc]    [Back]

     Fortran :
     subroutine	cscal1d( n, alpha, array, inc)
	  integer	     n,	inc
	  real		     alpha
	  complex	     array(0:(n-1)*inc)
     subroutine	zscal1d( n, alpha, array, inc)
	  integer	     n,	inc
	  real*8	     alpha
	  complex*16	     array(0:(n-1)*inc)

     C :
     #include <fft.h>
     int cscal1d ( int n, float	alpha, complex *array, int inc);
     int zscal1d ( int n, double alpha,	zomplex	*array,	int inc);

DESCRIPTION    [Toc]    [Back]

     cscal1d and zscal1d scale a complex sequences 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.  cscal1d or	zscal1d	are used to scale back the result.

PARAMETERS    [Toc]    [Back]

     N Integer,	the number of samples in each sequence.
     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.

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


Example	of Calling Sequence
     Given a 1D	Complex	sequence of 200	samples.  We successively apply	a
     Direct Fourier Transform, an Inverse Fourier Trasnform and	finally	scale
     back the result by	a factor 1/N (1/200.)-
     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 :
	  complex array(0:200-1), coeff(200+15)
	  call cfft1di(	200, coeff)



									Page 1






cscal1d,zscal1d(3F)					   cscal1d,zscal1d(3F)



	 call cfft1d( -1, 200, array, 1, coeff)
	  call cfft1d(	1, 200,	array, 1, coeff)
	  call cscal1d(200,(1./real(200)),array,1)

     C :
	  #include <fft.h>
	  complex array[200], *coeff;
	  coeff	= cfft1di( 200,	NULL);
	  cfft1d( -1, 200, array, 1, coeff);
	  cfft1d(  1, 200, array, 1, coeff);
	  cscal1d( 200,	1./(float)200, 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, cfft1di, zfft1di, cfft1d, zfft1d, sprod1d, dprod1d


									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