GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
passb4.f
Go to the documentation of this file.
1  subroutine passb4 (ido,l1,cc,ch,wa1,wa2,wa3)
2  dimension cc(ido,4,l1) ,ch(ido,l1,4) ,
3  1 wa1(1) ,wa2(1) ,wa3(1)
4  if (ido .ne. 2) go to 102
5  do 101 k=1,l1
6  ti1 = cc(2,1,k)-cc(2,3,k)
7  ti2 = cc(2,1,k)+cc(2,3,k)
8  tr4 = cc(2,4,k)-cc(2,2,k)
9  ti3 = cc(2,2,k)+cc(2,4,k)
10  tr1 = cc(1,1,k)-cc(1,3,k)
11  tr2 = cc(1,1,k)+cc(1,3,k)
12  ti4 = cc(1,2,k)-cc(1,4,k)
13  tr3 = cc(1,2,k)+cc(1,4,k)
14  ch(1,k,1) = tr2+tr3
15  ch(1,k,3) = tr2-tr3
16  ch(2,k,1) = ti2+ti3
17  ch(2,k,3) = ti2-ti3
18  ch(1,k,2) = tr1+tr4
19  ch(1,k,4) = tr1-tr4
20  ch(2,k,2) = ti1+ti4
21  ch(2,k,4) = ti1-ti4
22  101 continue
23  return
24  102 do 104 k=1,l1
25  do 103 i=2,ido,2
26  ti1 = cc(i,1,k)-cc(i,3,k)
27  ti2 = cc(i,1,k)+cc(i,3,k)
28  ti3 = cc(i,2,k)+cc(i,4,k)
29  tr4 = cc(i,4,k)-cc(i,2,k)
30  tr1 = cc(i-1,1,k)-cc(i-1,3,k)
31  tr2 = cc(i-1,1,k)+cc(i-1,3,k)
32  ti4 = cc(i-1,2,k)-cc(i-1,4,k)
33  tr3 = cc(i-1,2,k)+cc(i-1,4,k)
34  ch(i-1,k,1) = tr2+tr3
35  cr3 = tr2-tr3
36  ch(i,k,1) = ti2+ti3
37  ci3 = ti2-ti3
38  cr2 = tr1+tr4
39  cr4 = tr1-tr4
40  ci2 = ti1+ti4
41  ci4 = ti1-ti4
42  ch(i-1,k,2) = wa1(i-1)*cr2-wa1(i)*ci2
43  ch(i,k,2) = wa1(i-1)*ci2+wa1(i)*cr2
44  ch(i-1,k,3) = wa2(i-1)*cr3-wa2(i)*ci3
45  ch(i,k,3) = wa2(i-1)*ci3+wa2(i)*cr3
46  ch(i-1,k,4) = wa3(i-1)*cr4-wa3(i)*ci4
47  ch(i,k,4) = wa3(i-1)*ci4+wa3(i)*cr4
48  103 continue
49  104 continue
50  return
51  end