File: analpf.cat

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (49 lines) | stat: -rw-r--r-- 1,530 bytes parent folder | download
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
47
48
49
analpf            Scilab Group            Scilab Function            analpf
NAME
   analpf - create analog low-pass filter 
  
CALLING SEQUENCE
 [hs,pols,zers,gain]=analpf(n,fdesign,rp,omega)
PARAMETERS
 n          : positive integer : filter order 
            
 fdesign    : string : filter design method : 'butt' or 'cheb1' or 'cheb2'
            or 'ellip'
            
 rp         : 2-vector of error values for cheb1, cheb2 and ellip filters
            where only rp(1) is used for cheb1 case, only rp(2) is used for
            cheb2 case, and rp(1) and rp(2) are both used for ellip case. 
            0<rp(1),rp(2)<1
            
           -    for cheb1 filters 1-rp(1)<ripple<1 in passband
                
           -    for cheb2 filters 0<ripple<rp(2) in stopband
                
           -    for ellip filters 1-rp(1)<ripple<1 in passband
                0<ripple<rp(2) in stopband
                
 omega      : cut-off frequency of low-pass filter in Hertz
            
 hs         : rational polynomial transfer function
            
 pols       : poles of transfer function
            
 zers       : zeros of transfer function
            
 gain       : gain of transfer function
            
DESCRIPTION
   Creates analog low-pass filter with cut-off frequency at omega.
  
   hs=gain*poly(zers,'s')/poly(pols,'s')
  
EXAMPLE
 //Evaluate magnitude response of continuous-time system 
 hs=analpf(4,'cheb1',[.1 0],5)
 fr=0:.1:15;
 hf=freq(hs(2),hs(3),%i*fr);
 hm=abs(hf);
 plot(fr,hm)
AUTHOR
   C. B.