subroutine salwc(a,r1,r2,m,l,lda,job) integer m,l,lda,job complex a(lda,l),r1(l),r2(l) c c salwc computes the direct or inverse discrete fourier c transformation for rows of a complex rectangular matrix . c c on entry c c a complex(m,l) c the input matrix . c c r1 complex(l) c a work vector . c c r2 complex(l) c a work vector . c c m integer c the number of rows of the matrix a . c c l integer c the number of columns of the matrix a . c c lda integer c the leading dimension of the array a . c c job integer c = 1 for direct fourier transformation . c = -1 for inverse fourier transformation . c c on return c c a the transformed rows of the matrix . c c toeplitz package. this version dated 07/23/82 . c c subroutines and functions c c fortran ... cmplx,cos,float,sin c c internal variables c integer i,i1,i2 real p,ri,rl,v1,v2 complex e,f c if (l .eq. 1) go to 60 rl = float(l) c r1(1) = (1.0e0,0.0e0) ri = 0.0e0 do 10 i1 = 2, l ri = ri + 1.0e0 c c minimize error in forming multiples of 2*pi . c p = ((201.e0/32.e0)*ri + 1.93530717958647692528e-3*ri)/rl c v1 = cos(p) v2 = sin(p) if (job .eq. (-1)) v2 = -v2 r1(i1) = cmplx(v1,v2) 10 continue do 50 i = 1, m do 30 i1 = 1, l e = r1(i1) f = a(i,1) do 20 i2 = 2, l f = e*f + a(i,i2) 20 continue r2(i1) = e*f 30 continue do 40 i1 = 1, l a(i,i1) = r2(i1) 40 continue 50 continue 60 continue return end