File: desi11.f

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (46 lines) | stat: -rw-r--r-- 981 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
      subroutine desi11(nmaxi,maxdeg,vsn,ndeg,gd1,gd2,adelta,nzm,sm
     *,nzero,pren,pimn,ugc,ogc,nj,nh)
c!purpose
c butterworth filter
c computation of the zeros and locations of the extrema
c!
c
      implicit double precision (a-h,o-z)
      external slamch
      real slamch
      dimension  nzm(*),sm(maxdeg,4),nzero(*),pren(*),pimn(*)
c
      pi=4.0d+0*atan(1.0d+0)
      flma=2.0d+0**(int(slamch('l'))-2)
c
      adelta = vsn**ndeg
c
      nh = ndeg/2
      nj = (ndeg+1)/2
      fdeg = real(ndeg)
      fn = pi/2.0d+0/fdeg
c
      do 10 i=1,nj
        nzero(i) = 0
        iii = i + i - 1
        q = fn*real(iii)
        pren(i) = sin(q)
        pimn(i) = cos(q)
  10  continue
c
      fn = 2.0d+0*fn
      nzero(1) = ndeg
      nzm(1) = 1
      sm(1,1) = 0.0d+0
      nzm(2) = 1
      sm(1,2) = 1.0d+0
      nzm(3) = 1
      sm(1,3) = vsn
      nzm(4) = 1
      sm(1,4) = flma
c
      ugc = gd2/adelta
      ogc = gd1
      sm(nmaxi-1,4) = 1.0d+0
      return
      end