~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to man/signal/cheb2mag.cat

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
cheb2mag          Scilab Group          Scilab Function            cheb2mag
2
 
NAME
3
 
   cheb2mag - response of type 2 Chebyshev filter
4
 
  
5
 
CALLING SEQUENCE
6
 
 [h2]=cheb2mag(n,omegar,A,sample)
7
 
PARAMETERS
8
 
 n          : integer ; filter order 
9
 
            
10
 
 omegar     : real scalar : cut-off frequency
11
 
            
12
 
 A          : attenuation in stop band
13
 
            
14
 
 sample     : vector of frequencies where cheb2mag is evaluated
15
 
            
16
 
 h2         : vector of Chebyshev II filter values at sample points
17
 
            
18
 
DESCRIPTION
19
 
   Square magnitude response of a type 2 Chebyshev filter.
20
 
  
21
 
   omegar = stopband edge, sample = vector of  frequencies where the square
22
 
  magnitude h2 is desired.
23
 
  
24
 
EXAMPLE
25
 
 //Chebyshev; ripple in the stopband
26
 
 n=10;omegar=6;A=1/0.2;sample=0.0001:0.05:10;
27
 
 h2=cheb2mag(n,omegar,A,sample);
28
 
 plot(sample,log(h2)/log(10),'frequencies','magnitude in dB')
29
 
 //Plotting of frequency edges
30
 
 minval=(-maxi(-log(h2)))/log(10);
31
 
 plot2d([omegar;omegar],[minval;0],[2],"000");
32
 
 //Computation of the attenuation in dB at the stopband edge
33
 
 attenuation=-log(A*A)/log(10);
34
 
 plot2d(sample',attenuation*ones(sample)',[5],"000")
35
 
SEE ALSO
36
 
   cheb1mag 
37