~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to routines/signal/trbize.f

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      subroutine trbize(nmaxi,maxdeg,nzm,nzero,sm,zm,zzr,zzi)
 
2
c!purpose
 
3
c bilinear transformation of the zeros and the locations of the extrema
 
4
c!
 
5
c
 
6
      implicit double precision (a-h,o-z)
 
7
      dimension nzm(*)
 
8
      dimension sm(maxdeg,*), nzero(*)
 
9
      double precision zm(maxdeg,*), zzr(*), zzi(*)
 
10
      external slamch, dlamch
 
11
      real slamch
 
12
c
 
13
      flma=2.0d+0**(int(slamch('l'))-2)
 
14
      flmi=2.0d+0*dlamch('p')
 
15
      fa = 1.0d+0
 
16
        do 50 j=1,4
 
17
        me = nzm(j)
 
18
        do 40 i=1,me
 
19
          qi = sm(i,j)
 
20
          zm(i,j) = 2.0d+0*atan(qi)
 
21
          if (j.ne.4) go to 40
 
22
          if (qi.ge.flma) go to 10
 
23
          if (qi.lt.flmi) go to 20
 
24
          qqi = qi*qi
 
25
          q = 1.0d+0 + qqi
 
26
          zzr(i) = (1.0d+0-qqi)/q
 
27
          zzi(i) = 2.0d+0*qi/q
 
28
          nu = nzero(i)/2
 
29
          fa = fa*q**nu
 
30
          go to 40
 
31
c
 
32
  10      zzr(i) = -1.0d+0
 
33
          go to 30
 
34
c
 
35
  20      zzr(i) = 1.0d+0
 
36
   30      zzi(i) = 0.0d+0
 
37
  40    continue
 
38
  50  continue
 
39
c
 
40
      sm(nmaxi-1,1) = fa
 
41
      return
 
42
      end