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

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

Contents


sscal2d,dscal2d(3F)					   sscal2d,dscal2d(3F)


NAME    [Toc]    [Back]

     sscal2d, dscal2d -	scales 2D real sequence.

SYNOPSYS    [Toc]    [Back]

     Fortran :
     subroutine	sscal2d( n1, n2, alpha,	array, lda)
	  integer	     n1, n2, lda
	  real		     alpha, array(lda,n2)
     subroutine	dscal2d( n1, n2, alpha,	array, lda)
	  integer	     n1, n2, lda
	  real*8	     alpha, array(lda,n2)

     C :
     #include <fft.h>
     int sscal2d(int n1,int n2,float alpha,
	       float *array,int	lda);
     int dscal2d(int n1,int n2,double alpha,
	       double *array,int lda);

DESCRIPTION    [Toc]    [Back]

     sscal2d and dscal2d scale the 2D real sequence of N1xN2 sample.
     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	sscal2d	or dscal2d 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 sub-sequences (e.g between {i,j+1} and	{i,j} ).
	  Unchanged on exit.


Example	of Calling Sequence
     Working on	64x1024	2D sequence.  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.))-
     This sequence DirectFFT-InverseFFT-Scaling	is equivalent to the identity
     operator and the final sequence should be equal (with round-off



									Page 1






sscal2d,dscal2d(3F)					   sscal2d,dscal2d(3F)



     precision)	to the initial sequence.
     The offset	between	the first element of two succesive sub-sequence
     (leading dimension) is 1026 (1026 >= 1024+2).
     Fortran
	  real array(0:1026-1,0:64-1), coeff((1024+15)+2*(64+15))
	  call scfft2dui( 1024,	64, coeff)
	  call scfft2du( -1, 1024, 64, array, 1026, coeff)
	  call csfft2du(  1, 1024, 64, array, 1026, coeff)
	  call sscal2d(1024,64,(1./real(1024*64)),array,1026)

     C
	  #include <fft.h>
	  float	array[64*1026],	*coeff;
	  coeff	= scfft2dui( 1024, 64, NULL);
	  scfft2du( -1,	1024, 64, array, 1026, coeff);
	  csfft2du(  1,	1024, 64, array, 1026, coeff);
	  sscal2d( 1024,64,1./(float)(1024*64),array,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    [Toc]    [Back]

      
      
     fft, scfft2dui, dzfft2dui,	scfft2du, dzfft2du, csfft2du, zdfft2du,
     sprod2du, dprod2du


									PPPPaaaaggggeeee 2222
[ Back ]
 Similar pages
Name OS Title
sscal3d IRIX scales 3D real sequence.
cscal1d IRIX scales a 1D real sequence.
sscal1d IRIX scales a 1D 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
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service