1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="cheb2mag">
4 <refname>cheb2mag</refname>
5 <refpurpose>response of type 2 Chebyshev filter</refpurpose>
9 <synopsis>[h2]=cheb2mag(n,omegar,A,sample)</synopsis>
12 <title>Arguments</title>
17 <para>integer ; filter order</para>
23 <para>real scalar : cut-off frequency</para>
29 <para>attenuation in stop band</para>
35 <para>vector of frequencies where cheb2mag is evaluated</para>
41 <para>vector of Chebyshev II filter values at sample points</para>
47 <title>Description</title>
49 Square magnitude response of a type 2 Chebyshev filter.
52 <literal>omegar</literal> = stopband edge, <literal>sample</literal> = vector of
53 frequencies where the square magnitude <literal>h2</literal> is desired.
57 <title>Examples</title>
58 <programlisting role="example"><![CDATA[
59 //Chebyshev; ripple in the stopband
63 Samples=0.0001:0.05:10;
64 h2=cheb2mag(n,omegar,A,Samples);
65 plot(Samples,log(h2)/log(10))
66 xtitle("", "frequencies", "magnitude in dB");
68 //Plotting of frequency edges
69 minval=(-max(-log(h2)))/log(10);
70 plot2d([omegar;omegar],[minval;0],[2],"000");
72 //Computation of the attenuation in dB at the stopband edge
73 attenuation=-log(A*A)/log(10);
74 plot2d(Samples',attenuation*ones(Samples)',[5],"000")
76 <scilab:image><![CDATA[
77 n=10;omegar=6;A=1/0.2;Samples=0.0001:0.05:10;
78 h2=cheb2mag(n,omegar,A,Samples);
79 plot(Samples,log(h2)/log(10))
80 xtitle("", "frequencies", "magnitude in dB");
82 minval=(-max(-log(h2)))/log(10);
83 plot2d([omegar;omegar],[minval;0],[2],"000");
85 attenuation=-log(A*A)/log(10);
86 plot2d(Samples',attenuation*ones(Samples)',[5],"000")
89 <refsection role="see also">
90 <title>See also</title>
91 <simplelist type="inline">
93 <link linkend="cheb1mag">cheb1mag</link>