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

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

Contents


cscal2d,zscal2d(3F)					   cscal2d,zscal2d(3F)


NAME    [Toc]    [Back]

     cscal2d, zscal2d -	scales a 2D complex sequence.

SYNOPSYS    [Toc]    [Back]

     Fortran :
     subroutine	cscal2d( n1, n2, alpha,	array, lda)
	  integer     n1, n2, lda
	  real	      alpha
	  complex     array(lda,n2)
     subroutine	zscal2d( n1, n2, alpha,	array, lda)
	  integer     n1, n2, lda
	  real*8      alpha
	  double complex array(lda,n2)

     C :
     #include <fft.h>
     int cscal2d(int n1,int n2,float alpha,
	       complex *array,int lda);
     int zscal2d(int n1,int n2,double alpha,
	       zomplex *array,int lda);

DESCRIPTION    [Toc]    [Back]

     cscal2d and zscal2d scale a 2D complex sequence of	size N1xN2.
     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.  So	cscal2d	or zscal2d may be used to scale	back the
     result.

PARAMETERS    [Toc]    [Back]

     N1	- Integer, the first dimension size of the 2D sequence.
     Unchanged on exit.

     N2	- Integer, the second dimension	size of	the 2D sequence.
     Unchanged on exit.

     Alpha - scaling floating point value.

     ARRAY - Array containing the samples of the 2D sequence to	be
     transformed.
     On	input, the element {i,j} of the	sequence is stored as A(i,j) in
     Fortran , and A[i+j*lda] in C.
     On	exit, the array	is overwritten by its transform.  LDA -	Integer,
     leading dimension:	increment between the samples of two consecutive subsequences
 (e.g between {i,j+1} and	{i,j}).
     Unchanged on exit.


Example	of Calling Sequence
     Given a 2D	complex	sequence of size 64x1024.  We successively apply a
     Direct Fourier Transform, an Inverse Fourier Transform and	finally	scale
     back the result by	a factor 1/N (1/(64*1024.))-



									Page 1






cscal2d,zscal2d(3F)					   cscal2d,zscal2d(3F)



     This succession DirectFFT-InverseFFT-Scaling is equivalent	to the
     identity operator and the final sequence should be	equal (with round-off
     precision)	to the initial sequence.
     The offset	between	the first element of two succesive sub-sequence
     (leading dimension) is 2049.
     Fortran
	  complex array(0:2049-1,0:64-1), coeff(1024+64+2*15)
	  call cfft2di(	1024, coeff)
	  call cfft2d( -1, 1024, 64, array, 2049, coeff)
	  call cfft2d(	1, 1024, 64, array, 2049, coeff)
	  call cscal2d(1024,64,(1./real(1024*64)),array,2049)

     C
	  #include <fft.h>
	  complex array[64*2049], *coeff;
	  coeff	= cfft2di( 1024, NULL);
	  cfft2d( -1, 1024, 64,	array, 2049, coeff);
	  cfft2d(  1, 1024, 64,	array, 2049, coeff);
	  cscal2d( 1024,64,1./(float)(1024*64),array,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    [Toc]    [Back]

      
      
     fft, cfft2di, zfft2di, cfft2d, zfft2d, cprod2d, zprod2d


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
cscal3d IRIX scales a 3D complex sequence.
sscal1d IRIX scales a 1D real sequence.
sscal3d IRIX scales 3D real sequence.
sscal2d IRIX scales 2D real sequence.
cscal1d IRIX scales a 1D real sequence.
cscalm1d IRIX scales Multiple 1D complex sequences.
clar2v IRIX from both sides to a sequence of 2-by-2 complex Hermitian matrices,
zlar2v IRIX from both sides to a sequence of 2-by-2 complex Hermitian matrices,
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